#42147 [NEW]: Possible PDO issue with an SQLite expression
From: the at email dot address
Operating system: Windows XP
PHP version: 5.2.3
PHP Bug Type: PDO related
Bug description: Possible PDO issue with an SQLite expression
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 bug report at http://bugs.php.net/?id=42147&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42147&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42147&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42147&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42147&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42147&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42147&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42147&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42147&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42147&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42147&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42147&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42147&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42147&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42147&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42147&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42147&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42147&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42147&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42147&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42147&r=mysqlcfg
Thread (3 messages)
- the at email dot address