Created
February 23, 2012 16:13
-
-
Save chonthu/1893482 to your computer and use it in GitHub Desktop.
on_duplicate_update 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once(BASEPATH.'database/DB_driver.php'); | |
if ( ! isset($active_record) OR $active_record == TRUE) | |
{ | |
require_once(BASEPATH.'database/DB_active_rec'.EXT); | |
// get the CI instance | |
$CI = & get_instance(); | |
$prefix = $CI->config->item('subclass_prefix'); | |
if (file_exists(APPPATH.'core/'.$prefix.'DB_active_rec'.EXT)) | |
{ | |
require_once(APPPATH.'core/'.$prefix.'DB_active_rec'.EXT); | |
if ( ! class_exists('CI_DB')) | |
{ | |
eval('class CI_DB extends '.$prefix.'DB_active_record { }'); | |
} | |
} | |
else | |
{ | |
if ( ! class_exists('CI_DB')) | |
{ | |
eval('class CI_DB extends CI_DB_active_record { }'); | |
} | |
} | |
} | |
else | |
{ | |
if ( ! class_exists('CI_DB')) | |
{ | |
eval('class CI_DB extends CI_DB_driver { }'); | |
} | |
} | |
require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment