DatabaseHandler

  1. 5.x custom/classes/DatabaseHandler.php DatabaseHandler
  2. 4.x custom/classes/DatabaseHandler.php DatabaseHandler

Hierarchy

Expanded class hierarchy of DatabaseHandler

Properties

NameDescription
_DatabaseHandler::$dbc
_DatabaseHandler::$pdo

Functions & methods

NameDescription
_DatabaseHandler::add_draft_instruction
_DatabaseHandler::db_affected_rows
_DatabaseHandler::db_close
_DatabaseHandler::db_errorDraw out the error onto the screen.
_DatabaseHandler::db_fetch_array
_DatabaseHandler::db_fetch_object
_DatabaseHandler::db_insert_id
_DatabaseHandler::db_num_rows
_DatabaseHandler::db_queryThis function is used to perform a database query. It uses PDO execute, which will take automatically replace ? with variables you supply as the arguments to this function, or as an array to this function. Either will work. Do this by using ?, or…
_DatabaseHandler::duplicate_advising_sessionGiven an advising_session_id, create a duplicate of it as a new session_id (and return the new session_id).
_DatabaseHandler::duplicate_course_for_year
_DatabaseHandler::escape_question_marksThis is a simple helper function which "escapes" the question marks (?) in the string, by changing them to "??". This makes it suitable for use within db_query(), but not necessary if used as an argument. …
_DatabaseHandler::get_advising_session_id
_DatabaseHandler::get_course_id
_DatabaseHandler::get_degrees_in_catalog_year
_DatabaseHandler::get_degree_allow_dynamicReturns the value of a degree's allow_dynamic field in the database.
_DatabaseHandler::get_degree_id
_DatabaseHandler::get_degree_ids
_DatabaseHandler::get_degree_plan
_DatabaseHandler::get_degree_tracks
_DatabaseHandler::get_developmental_requirements
_DatabaseHandler::get_faculty_major_code
_DatabaseHandler::get_faculty_major_code_csvLooks in our extra tables to find out what major code, if any, has been assigned to this faculty member.
_DatabaseHandler::get_faculty_nameReturns the faculty's first and last name, put together. Ex: John Smith or John W Smith.
_DatabaseHandler::get_flightpath_settings
_DatabaseHandler::get_group_id
_DatabaseHandler::get_group_nameReturns the group_id for the given group name, or FALSE
_DatabaseHandler::get_institution_name
_DatabaseHandler::get_student_catalog_year
_DatabaseHandler::get_student_cumulative_hours
_DatabaseHandler::get_student_gpa
_DatabaseHandler::get_student_majors_from_dbReturns an array (or CSV string) of major_codes from the student_degrees table for this student.
_DatabaseHandler::get_student_major_from_db
_DatabaseHandler::get_student_nameReturns the student's first and last name, put together. Ex: John Smith or John W Smith.
_DatabaseHandler::get_student_rankReturns whatever is in the Rank field for this student. Ex: JR, SR, FR, etc.
_DatabaseHandler::get_student_settings
_DatabaseHandler::get_substitution_details
_DatabaseHandler::get_user_settings
_DatabaseHandler::get_variableRetrieve a value from the variables table.
_DatabaseHandler::load_course_descriptive_data
_DatabaseHandler::request_new_course_id
_DatabaseHandler::request_new_degree_id
_DatabaseHandler::request_new_group_id
_DatabaseHandler::set_maintenance_modeSets the maintenance mode. $val should be either 0 (off) or 1 (on)
_DatabaseHandler::set_variableSets a variable's value in the variables table.
_DatabaseHandler::update_course_id
_DatabaseHandler::update_course_requirement_from_name
_DatabaseHandler::update_user_settings_from_post
_DatabaseHandler::z__add_to_log
_DatabaseHandler::z__db_affected_rows
_DatabaseHandler::z__db_close
_DatabaseHandler::z__db_errorDraw out the error onto the screen.
_DatabaseHandler::z__db_fetch_array
_DatabaseHandler::z__db_fetch_object
_DatabaseHandler::z__db_insert_id
_DatabaseHandler::z__db_num_rows
_DatabaseHandler::z__db_queryThis function is used to perform a database query. It can take simple replacement patterns, by using ?. If you actually need to have a ? in the query, you can escape it with ??. For example: $result = $db->db_query("SELECT * FROM table WHERE…
_DatabaseHandler::z__get_help_page
_DatabaseHandler::z__get_table_transfer_data_string
_DatabaseHandler::__construct
_DatabaseHandler::__sleepThis is a PHP "magic" function. Called during a serialize command. Basically, we aren't trying to save any local variables. In fact, we will get a fatal exception if we try to serialize our PDO connection.
_DatabaseHandler::__wakeupThis function is called when this objectis unserialized. We want to reconnect to the database, so we'll call our constructor.

File

custom/classes/DatabaseHandler.php, line 3

View source