#35248 [Asn->Csd]: sqlite_query() doesnt set error_msg
| From: | iliaa@php.net | Date: | Thu, 17 Nov 2005 14:40:20 +0000 |
| Subject: | #35248 [Asn->Csd]: sqlite_query() doesnt set error_msg | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88402@lists.php.net to get a copy of this message | ||
ID: 35248
Updated by: iliaa@php.net
Reported By: jwellis at carlalbert dot edu
-Status: Assigned
+Status: Closed
Bug Type: SQLite related
Operating System: *
PHP Version: 5.1.0RC5
Assigned To: wez
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-11-16 23:46:53] sniper@php.net
As far as I can tell, this is intentional. Perhaps Wez can share a
light on the reasoning behind it though. (so that our brave documenters
can do their work :)
------------------------------------------------------------------------
[2005-11-16 23:28:26] jwellis at carlalbert dot edu
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 this bug report at http://bugs.php.net/?id=35248&edit=1