From: Yves G. <yg...@mi...> - 2005-08-27 09:08:17
|
On Saturday 27 August 2005 06:24, Firman Wandayandi wrote: > On 8/26/05, Yves Glodt <yg...@mi...> wrote: > > > Nice idea. And also we need to think about "phpsla" system db, > > > should we use SQLite2 or SQLite3 or both (2 databases)? > > > > I'd say we should stay with v2 as long as possible, because v3 will > > only work with php >= 5.1, whereas v2 will work even with php4. > > Let me clarify, PDO work on PHP5.x (5.0.x or 5.1.x). If we stay with > v2, that's mean the user *MUST* load the sqlite extension even he/she > use PHP5.x and v3 databases only with PDO extension behind phpsla. Didn't know it would also work with 5.0 :-) > IMHO that isn't suitable solution. It seems pdo supports both sqlite2 and sqlite3... Look here: http://www.sita.lu:82/phpinfo.php "PDO drivers sqlite2, sqlite, odbc, mysql, firebird" All you need is to specify the correct connection string, e.g.: $db = new PDO('sqlite2:/tmp/i-man.sqlite2'); // version 2 $db = new PDO('sqlite:/tmp/i-man.sqlite3'); // version 3 I was not aware until 5 minutes ago that pdo can support both, so that means we could drop the use of the php_sqlite extension in favor of the pdo sqlite functions and support v2 and v3 in the same code (well apart of sqlite sql features that differ between v2 and v3). Of course we lock out then all the users of php4 :-( Now, comments! Have a nice weekend, Yves -- Linux 2.6.12 #1 Sat Jul 9 23:28:04 CEST 2005 i686 10:36:34 up 15:45, 0 users, load average: 0.39, 0.88, 0.85 |