function _DatabaseHandler::get_student_major_from_db

4.x _DatabaseHandler.php _DatabaseHandler::get_student_major_from_db($student_cwid)
5.x _DatabaseHandler.php _DatabaseHandler::get_student_major_from_db($student_cwid)

File

classes/_DatabaseHandler.php, line 1471

Class

_DatabaseHandler

Code

function get_student_major_from_db($student_cwid) 
 {
  depricated_message("db->get_student_major_from_db() is deprecated. use get_student_major*s* instead.");
  // Returns the student's major code from the DB.  Does not
  // return the track code.

  // Let's perform our queries.
  $res = $this->db_query("SELECT * FROM students 
                      WHERE cwid = '?' ", $student_cwid);


  $cur = $this->db_fetch_array($res);
  return trim($cur ["major_code"]);
}