|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-12 11:29 UTC] rose dot andrew at gmail dot com
[2008-03-07 17:51 UTC] scottmac@php.net
[2008-03-15 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 18:00:01 2025 UTC |
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