On 9 Oct 2011, at 1:39am, Tim Streater wrote:

> On 08 Oct 2011 at 23:32, Simon Slavin <slav...@bigfraud.org> wrote: 
> 
>> I'm not clear whether you're using the PDO or the sqlite3 extension to PHP.
> 
> By the way, is one to be preferred over the other?

That is a great question, and I'd love to see answers from PHP programmers.

My contribution: the thing the PDO API has going for it is that it makes 
changing from one SQL engine to another simple.  If you develop on a 
stand-alone computer for a big multi-server network, this is an advantage.  On 
the other hand, the biggest advantage of using the SQLite3 API is that it's 
such a thin wrapper around the SQLite C API.  For someone who already knows 
SQLite it's very easy to pick up.  But that's only an advantage for experienced 
SQLite users, or those who want to be.

I have had trouble using the PDO API in situations that demand proper 
error-handling.  If you have a situation where something either works or 
doesn't you're fine.  If you have to understand exactly what error you got, in 
order to handle several different situations, you pretty-much have to simulate 
all your error conditions and see what happens to write your program.  The 
advantage of the SQLite3 interface here is that it perfectly reflects the 
documentation for the SQLite3 C API, so you can probably figure out what to do 
just by reading the SQLite C documentation.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to