function _DatabaseHandler::get_substitution_details
Search API
4.x _DatabaseHandler.php | _DatabaseHandler::get_substitution_details($sub_id) |
5.x _DatabaseHandler.php | _DatabaseHandler::get_substitution_details($sub_id) |
File
- classes/
_DatabaseHandler.php, line 141
Class
Code
function get_substitution_details($sub_id)
{
// Simply returns an associative array containing
// the details of a substitution. The subID specified
// is the actual id of the row of the database in
// flightpath.student_substitutions.
$rtn_array = array();
$res = $this->db_query("SELECT * FROM student_substitutions
WHERE id = '?' ", $sub_id);
if ($this->db_num_rows($res) > 0)
{
$cur = $this->db_fetch_array($res);
$rtn_array ["faculty_id"] = $cur ["faculty_id"];
$rtn_array ["remarks"] = trim($cur ["sub_remarks"]);
$rtn_array ["sub_hours"] = $cur ["sub_hours"];
$rtn_array ["required_course_id"] = $cur ["required_course_id"];
$rtn_array ["required_group_id"] = $cur ["required_group_id"];
$rtn_array ["posted"] = $cur ["posted"];
$rtn_array ["required_degree_id"] = $cur ["required_degree_id"];
$rtn_array ["db_record"] = $cur;
}
return $rtn_array;
}