ID:               38643
 User updated by:  chris dot vigelius at gmx dot net
 Reported By:      chris dot vigelius at gmx dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         PDO related
 Operating System: Linux
 PHP Version:      5.1.5
 New Comment:

the current snapshot does NOT solve the problem - there are 
still all rows returned.


Previous Comments:
------------------------------------------------------------------------

[2006-08-29 20:45:43] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



------------------------------------------------------------------------

[2006-08-29 15:18:47] chris dot vigelius at gmx dot net

Description:
------------
If a parameter appears more than once in a parametrized query,
unexpected behaviour occurs


Reproduce code:
---------------
$dbh = new PDO(...)
$stmt = $dbh->prepare("SELECT * FROM user WHERE name=:user OR
email=:user");
$stmt->execute(array(':user' => 'franz'));

Expected result:
----------------
only the rows are returned where either name or email are set to
'franz'

Actual result:
--------------
always all rows of the table are returned, which is clearly not what
one would expect


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38643&edit=1

Reply via email to