Page 1 of 1
Which is better -- pdo_sqlite or php5-pgsql3?
Posted: Mon Nov 05, 2007 9:44 pm
by supermike
Which is the most advised way to reach SQLite from PHP5/Apache2? I have both pdo_sqlite and php5-sqlite3 installed (on Ubuntu Feisty, in case you were wondering).
I want to use the best practice and am confused on which way is better to go.
Posted: Mon Nov 05, 2007 9:50 pm
by feyd
Define your qualifiers for better/most-advised.
Posted: Mon Nov 05, 2007 10:40 pm
by supermike
feyd wrote:Define your qualifiers for better/most-advised.
Okay:
Which is most likely to *not* be supported in the future in the next 2-3 years? That's one to avoid.
Which currently has the most bug fixes for, especially most recent? That's one to use.
Which one will I see developers mostly using and, if I were to release some F/OSS software to the wild, they would prefer to see that I had used?
How's that?

Posted: Mon Nov 05, 2007 11:23 pm
by Kieran Huggins
I'd go with PDO - it supports sqlite3 natively, ships with PHP, is abstracted to work with other DB engines, and is generally more popular.
Besides, php-sqlite3 is still in alpha after 3 years of development.
Posted: Wed Nov 07, 2007 9:33 pm
by Stryks
Though, do keep in mind that SQLite implementation via PDO is not exactly perfect.
I've been toying with an abstraction class for SQLite (PDO) but have yet to come across a method of pulling records affected or rows returned using the appropriate methods. Rows returned is an easy enough workaround, but I still have no method for getting rows affected.
Having said that though, it's fast, the data files are portable, and the whole thing requires zero configuration.