Skip to content

Instantly share code, notes, and snippets.

@rsanchez
Created September 13, 2013 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsanchez/6553852 to your computer and use it in GitHub Desktop.
Save rsanchez/6553852 to your computer and use it in GitHub Desktop.
create a standalone clone of the EE db object (useful when doing nested active record calls)
$db = ee()->load->database(array(
'dbdriver' => 'mysql',
'conn_id' => ee()->db->conn_id,
'database' => ee()->db->database,
'dbprefix' => ee()->db->dbprefix,
), TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment