According to the php info() function, on Ubuntu, PHP Version
5.2.3-1ubuntu6.2 was released on 3 December 2007 and includes the
PDO sqlite driver for sqlite version 3.5.2.

It also includes the extension library sqlite driver for version
2.8.17 so you have your choice there.

Personally, I use PDO with sqlite on my local server as a direct
substitute for PDO with mysql on the remote server. If you use only
simple sql statements then the only change needed is something like:

  define("SERVER_MYSQL",  1);
  define("SERVER_SQLITE",  2);
  define("DATABASE_SERVER", SERVER_SQLITE);
//  define("DATABASE_SERVER", SERVER_MYSQL);

try {
  if (DATABASE_SERVER == SERVER_MYSQL) {
    $dbh = new PDO("mysql:host=localhost;dbname=tasks", "tasks",
"tasks");
  }
  else {
    $dbh = new PDO('sqlite:tasks.db');
  }
}


On Mon, 2007-12-10 at 02:07 +0100, Kees Nuyt wrote:
> On Sun, 9 Dec 2007 23:34:44 +0100, DJ Anubis
> <[EMAIL PROTECTED]> wrote:
> 
> >Le dimanche 9 décembre 2007, Gilles Ganault a écrit :
> >> It seems like I have two options:
> >> - calling the SQLite library
> >> - going through the PDO interface, and its SQLite module.
> >>
> >> Which of the two would you recomend? Are there other options I
> >> should know about?
> >
> >I would recommend using PDO interface, as this is the standard 
> >PHP5 API.
> 
> I agree. My experience with php_pdo_sqlite is positive, and I
> think it is the easiest way to use sqlite3 in PHP.
> 
> I didn't try php_pdo_sqlite_external yet, it seems to call a
> self-supplied sqlite3.dll, so one would be able to use the
> latest SQLite3 version.
> 
> >Don't worry about PHP4, as this old version will no more be 
> >supported soon...


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to