Home » Database » DB » Bug #1243
prepare() handles "!=" as token
Details
| Submitted | 2004-04-20 08:17 UTC |
|---|---|
| From | sarukar at hotmail dot com |
| Assigned | danielc |
| Status | Bogus |
| Package | DB |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-04-20 08:17 UTC] sarukar at hotmail dot com
Description:
------------
the prepare function handles the search for tokens too simple which e.g. results in misinterpreting the sql-operator "!=" as a valid token and therefore produces a DB::mismatch error.
Reproduce code:
---------------
$db->query("SELECT * FROM table WHERE a!='' AND (b < ? OR b > ? )", array( 3, 4 ) );
Expected result:
----------------
query is executed
Actual result:
--------------
DB:mismatch error
[2004-04-20 08:55 UTC] sarukar at hotmail dot com
changed OS to "irrelevant"