0

I'm having this error when trying to do a request from a PDO object (with ez_sql) on a sqlite database.

I read here: http://us.php.net/manual/en/ref.pdo-sqlite.php that the db could be empty and that pdo will create automatically the db file.

So i do :

$ezSQL = new \ezSQL_pdo('sqlite:'.CHM.'/includes/stouv.sq3'); // file exists and is empty
// query on the $ezSQL object

And i get this error :

invalid data source name

I'm using the last version of WAMP with pdo_sqlite extension..

I don't know how to fix it.

Leto
  • 2,594
  • 3
  • 24
  • 37

1 Answers1

-1

Ok, the problem was that ez_sql do not connect to the DB before the first query, because no username and password were set (second and third argument of the constructor).

Leto
  • 2,594
  • 3
  • 24
  • 37