function DatabaseHandler::get_degree_allow_dynamic

7.x DatabaseHandler.php DatabaseHandler::get_degree_allow_dynamic($degree_id, $bool_use_draft = FALSE)
6.x DatabaseHandler.php DatabaseHandler::get_degree_allow_dynamic($degree_id, $bool_use_draft = FALSE)

Returns the value of a degree's allow_dynamic field in the database.

Returns boolean FALSE if it cannot find the degree.

Parameters

unknown_type $degree_id:

unknown_type $bool_use_draft:

1 call to DatabaseHandler::get_degree_allow_dynamic()
DatabaseHandler::get_student_majors_from_db in classes/DatabaseHandler.php
Returns an array (or CSV string) of major_codes from the student_degrees table for this student.

File

classes/DatabaseHandler.php, line 1634

Class

DatabaseHandler

Code

function get_degree_allow_dynamic($degree_id, $bool_use_draft = FALSE) {

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

  $res7 = $this->db_query("SELECT allow_dynamic FROM $table_name
              WHERE degree_id = ?              
               ", $degree_id);
  if ($this->db_num_rows($res7) > 0) 
   {
    $cur7 = $this->db_fetch_array($res7);
    return $cur7 ["allow_dynamic"];
  }
  return false;



}