PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #1243

prepare() handles "!=" as token

Details

Submitted2004-04-20 08:17 UTC
Fromsarukar at hotmail dot com
Assigneddanielc
StatusBogus
PackageDB
PHP VersionIrrelevant
OSIrrelevant
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"