a guest Jan 21st, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public function database($params = '', $return = FALSE, $active_record = NULL)
- // Grab the super object
- $CI =& get_instance();
- // Do we even need to load the database class?
- if (class_exists('CI_DB') AND $return == FALSE AND $active_record == NULL AND isset($CI->db) AND is_object($CI->db))
- return FALSE;
- if ($return === TRUE)
- return DB($params, $active_record);
- // Initialize the db variable. Needed to prevent
- // reference errors with some configurations
- $CI->db = '';
- // Load the DB class
- $CI->db =& DB($params, $active_record);
RAW Paste Data