From: jwellis at carlalbert dot edu
Operating system: Windows
PHP version: 5.1.0RC5
PHP Bug Type: SQLite related
Bug description: sqlite_query() doesnt set error_msg
Description:
------------
When setting the result of sqlite_query to a result set, if there is an
error, error_msg is not set. Example:
$result = $db->query("asdfesdfa", SQLITE_NUM, $db_error);
i would like to note, however, that if i dont set the results into a
result set, it works just fine. Example:
$db->query("asdfesdfa", SQLITE_NUM, $db_error);
Reproduce code:
---------------
$db = new SQLiteDatabase("sqlite_db1");
$result = $db->query("asdfesdfa", SQLITE_NUM, $db_error);
print">> $db_error<br>\n";
$db->query("asdfesdfa", SQLITE_NUM, $db_error);
print">> $db_error<br>\n";
Expected result:
----------------
>> near "asdfesdfa": syntax error
>> near "asdfesdfa": syntax error
Actual result:
--------------
>>
>> near "asdfesdfa": syntax error
--
Edit bug report at http://bugs.php.net/?id=35248&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35248&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35248&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35248&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35248&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35248&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35248&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35248&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35248&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35248&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35248&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35248&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35248&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35248&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35248&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35248&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35248&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35248&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35248&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35248&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35248&r=mysqlcfg