You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', 'root');
to
$pdo = DB::connection()->getPdo();
Why does the import stop working? I don't get any error messages, the SQL just doesn't run. It's not a big issue as I've got it to use my DB settings by using:
$pdo = new PDO('mysql:host='.$_ENV['DB_HOST'].';dbname='.$_ENV['DB_DATABASE'], $_ENV['DB_USERNAME'], $_ENV['DB_PASSWORD']);
but this isn't as nice!
The text was updated successfully, but these errors were encountered:
rosoonline
changed the title
Change PDO connection method
Changing PDO connection method doesn't work
Feb 25, 2015
If I change the code in the import example from:
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', 'root');
to
$pdo = DB::connection()->getPdo();
Why does the import stop working? I don't get any error messages, the SQL just doesn't run. It's not a big issue as I've got it to use my DB settings by using:
$pdo = new PDO('mysql:host='.$_ENV['DB_HOST'].';dbname='.$_ENV['DB_DATABASE'], $_ENV['DB_USERNAME'], $_ENV['DB_PASSWORD']);
but this isn't as nice!
The text was updated successfully, but these errors were encountered: