On Mon, 10 Dec 2007 08:36:54 -0400, Chris Peachment <[EMAIL PROTECTED]> wrote:
> 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. That's the advantage of (some) Linux distributions. I just updated my Windows Apache/2.2.4 with PHP 5.2.5 (.zip install, build date Nov 8 2007 23:18:08). Its php_pdo_sqlite is not very up to date, it appears to use SQLite 3.3.17. So I activated php_pdo_sqlite_external instead and copied sqlite3.dll v3.5.3 to %serverroot%/bin . That works like a charm. >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'); > } >} Nice setup. I still have MySQL v5.0.41 running next to SQLite for a few third party 'legacy' non-PDO MySQL applications, both on my development machine, in the production environment, and at home. -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------