Skip to content

Instantly share code, notes, and snippets.

@plankes-projects
Last active April 12, 2018 09:43
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 plankes-projects/afbe1d66eb08262a0f1484cf9fbaf402 to your computer and use it in GitHub Desktop.
Save plankes-projects/afbe1d66eb08262a0f1484cf9fbaf402 to your computer and use it in GitHub Desktop.
$dbConfig = [
'driver' => <data>,
'host' => <data>,
'port' => <data>,
'database' => <data>,
'username' => <data>,
'password' => <data>,
'charset' => <data>,
'collation' => <data>,
'prefix' => '',
'options' => [
\PDO::ATTR_TIMEOUT => 36000,
]
];
$db = new DB();
$db->addConnection($dbConfig);
$db->setAsGlobal();
DB::connection()->select(<query>, <params>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment