ID: 42935
User updated by: denis at mesoconcepts dot com
Reported By: denis at mesoconcepts dot com
Status: Open
Bug Type: PDO related
Operating System: freebsd
PHP Version: 5.2.4
New Comment:
was of course meant: when something is __not__ null
Previous Comments:
------------------------------------------------------------------------
[2007-10-11 21:20:53] denis at mesoconcepts dot com
Description:
------------
using select 1 where something is null returns an empty array
D.
Reproduce code:
---------------
try
{
$dbh =& new PDO(
'pgsql:host=' . $db_host . ';dbname=' . $db_name,
$db_user,
$db_pass
);
}
$dbs = $dbh->prepare("
SELECT 1
WHERE ? IS NOT NULL
");
$dbs->execute(array(1));
$res = $dbs->fetchAll();
var_dump($res);
Expected result:
----------------
a row
Actual result:
--------------
no rows
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42935&edit=1