function _DatabaseHandler::get_degree_ids

5.x _DatabaseHandler.php _DatabaseHandler::get_degree_ids($major_code)

File

classes/_DatabaseHandler.php, line 1798

Class

_DatabaseHandler

Code

function get_degree_ids($major_code) {

  $rtn = array();

  $bool_use_draft = FALSE;

  // Always override if the global variable is set.
  if (@$GLOBALS ["fp_advising"]["bool_use_draft"] == true) {
    $bool_use_draft = true;
  }

  $table_name = "degrees";
  if ($bool_use_draft) {
    $table_name = "draft_$table_name";
  }

  $res7 = $this->db_query("SELECT degree_id FROM $table_name
                            WHERE major_code = ?              
                            ", trim($major_code));

  while ($cur7 = $this->db_fetch_array($res7)) {
    $rtn [$cur7 ["degree_id"]] = $cur7 ["degree_id"];
  }


  return $rtn;


}