function FlightPath::get_subject_title

7.x FlightPath.php FlightPath::get_subject_title($subject_id, $school_id = 0)
6.x FlightPath.php FlightPath::get_subject_title($subject_id, $school_id = 0)

Get the plain English title of a subject, from subject_id. Ex: COSC = Computer Science.

Parameters

unknown_type $subject_id:

Return value

unknown

File

classes/FlightPath.php, line 1118

Class

FlightPath

Code

function get_subject_title($subject_id, $school_id = 0) 
 {
  // From the subject_id, get the title.
  // Example: COSC = Computer Science.

  $res = $this->db->db_query("SELECT title FROM subjects
              WHERE subject_id = ? 
              AND school_id = ?
              LIMIT 1 ", $subject_id, $school_id);
  $cur = $this->db->db_fetch_array($res);
  if ($cur) {
    return trim($cur ["title"]);
  }

}