Which is better -- pdo_sqlite or php5-pgsql3?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
supermike
Forum Contributor
Posts: 193
Joined: Tue Feb 28, 2006 8:30 pm
Location: Somewhere in the Desert, USA

Which is better -- pdo_sqlite or php5-pgsql3?

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Define your qualifiers for better/most-advised.
supermike
Forum Contributor
Posts: 193
Joined: Tue Feb 28, 2006 8:30 pm
Location: Somewhere in the Desert, USA

Post 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? :)
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post 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.
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post 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.
Post Reply