ID: 42147 Comment by: rose dot andrew at gmail dot com Reported By: the at email dot address Status: Open Bug Type: SQLite related Operating System: Windows XP PHP Version: 5.2.3 New Comment:
Unable to replicate bug on PHP 5.2.5/Linux. Previous Comments: ------------------------------------------------------------------------ [2007-07-30 15:16:28] the at email dot address Description: ------------ Using the IN() expression in a statement for SQLite causes a 'SQLSTATE[HY000]' error. I realise SQLite is probably not returning the right errorcode, but the important part is why an error occurs. The same statement in the commandline tool for SQLite, and also works fine with mySQL. Changing the statement to do the same action without an IN() expression ( "WHERE (name='this' OR name='that')" ) causes no error. Since as it's unlikely that the engine is different between the executable and the dll, I can only think of PDO mangling the statement somehow.. Reproduce code: --------------- $q = $db->query( "SELECT * FROM thetable WHERE name IN('this','that')" ); Expected result: ---------------- Listing of all rows where the name matches 'this' or 'that'. Actual result: -------------- Throws an exception: SQLSTATE[HY000]: General error: 14 unable to open database file ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42147&edit=1