Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting MDB2 to work with sqlite3 via pdo

I am using MDB2_Driver_pdoSqlite to access a sqlite3 database with PEAR. I am able to connect to the database and display a list of tables with listTables(), but when I try to run the mdb2 function tableInfo() I get an error. MDB2 Error: not found [Error message: primary is not an existing table constraint] I am running the following system:

  • MacOS X 10.5.8
  • PHP 5.3.0
  • sqlite 3.6.23.1
  • MDB2 2.5.0b2
  • MDB2 PDO SQLite3 driver v1

Any idea on what is causing this error and how to fix it?

like image 980
reubano Avatar asked Feb 11 '26 21:02

reubano


1 Answers

I emailed the author and he told me his driver doesn't support primary keys. Once I removed the primary key fields from my tables it worked. So I think I will try out Doctrine to get php database abstraction.

like image 163
reubano Avatar answered Feb 14 '26 19:02

reubano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!