function _DatabaseHandler::get_student_catalog_year

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

File

classes/_DatabaseHandler.php, line 979

Class

_DatabaseHandler

Code

function get_student_catalog_year($student_cwid) {

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


  $cur = $this->db_fetch_array($res);
  $catalog = $cur ["catalog_year"];

  $temp = explode("-", $catalog);
  return trim($temp [0]);
}