On Sat, 24 Jul 2010 08:33:21 -0400, Simon Slavin <slav...@bigfraud.org>  
wrote:

>
> On 24 Jul 2010, at 9:56am, Gilles Ganault wrote:
>
>> So from the above, it looks like this binary supports access to
>> MySQL(i) and SQLite2/3, in both procedural and (PDO) object-oriented
>> modes.
>>
>> If that's correct, and provided the application doesn't need to be
>> DB-agnostic... why should I choose PDO instead of the procedural
>> functions to SQLite3?
>
> The main advantage of the PDO is that the calls for each SQL engine are  
> identical.  In other words, you can write your code as if you're going  
> to use SQLite, then one day find you have to move to MySQL, and you'll  
> only have to change one line of code -- the one that says which engine  
> you want it to use.  If you're in a profession where you have to use  
> many SQL engines this can save you from having to learn the different  
> rules and foibles of each one.

This is mostly fantasy, as SQL engines have widely diverging language  
dialects; the API is a relatively small component of interoperability  
pain.  Still, it is a concern, and certainly a slight advantage to PDO.

PDO_sqlite3 also does have the advantage of being available by default  
since PHP 5.0.0, whereas sqlite3 is only available by default since PHP  
5.3.0.  I'm aware of no other advantages to using PDO, and from what I've  
read it's on the slow side.

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

Reply via email to