Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing PDO connection method doesn't work #58

Open
rosoonline opened this issue Feb 25, 2015 · 0 comments
Open

Changing PDO connection method doesn't work #58

rosoonline opened this issue Feb 25, 2015 · 0 comments

Comments

@rosoonline
Copy link

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!

@rosoonline rosoonline changed the title Change PDO connection method Changing PDO connection method doesn't work Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant