function get_global_database_handler
Search API
7.x db.inc | get_global_database_handler() |
6.x db.inc | get_global_database_handler() |
4.x misc.inc | get_global_database_handler() |
5.x misc.inc | get_global_database_handler() |
This method will return a globally-set DatabaseHandler object, creating it if it does not already exist. This is for efficiency reasons, so every module or method does not need to keep creating databasehandler objects (and re-connecting to the database).
92 calls to get_global_database_handler()
- admin_apply_draft_changes_form_submit in modules/
admin/ admin.module - Handles the actual moving of draft courses into production.
- admin_copy_degree_form_submit in modules/
admin/ admin.degrees.inc - admin_display_groups_popup_show_group_use in modules/
admin/ admin.groups.inc - Displays a popup showing where a particular group is being used in FlightPath.
- admin_duplicate_year_form_submit in modules/
admin/ admin.module - This function should perform the actual copy of data!
- admin_edit_course_form in modules/
admin/ admin.courses.inc - This form lets the user edit details about a course.
File
- includes/
db.inc, line 16 - This file contains mostly db shortcuts.
Code
function get_global_database_handler() {
$db = @$GLOBALS ["fp_global_database_handler"];
if (!is_object($db) || !is_object($db->pdo)) {
// Something isn't right, or it wasn't set correctly. Create a new connection.
$GLOBALS ["fp_global_database_handler"] = new DatabaseHandler();
}
return $GLOBALS ["fp_global_database_handler"];
}