Skip to content

Changing PDO connection method doesn't work #58

Description

@rosoonline

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions