Forwarding here.
Maybe it got lost inbetween the spam attacks, maybe its just not
interesting but lets open up the topic to a larger audience :)
-------- Original Message --------
Subject: fetch() returning false for empty datasets
Date: Mon, 05 Jun 2006 11:41:12 +0200
From: [EMAIL PROTECTED] (Lukas Smith)
To: [EMAIL PROTECTED]
Newsgroups: php.pecl.dev
Hi,
the following script outputs "false" (at least on whatever pdo version
is bundled with 5.1.4):
$sql = 'SELECT 1 FROM dual WHERE 1=0';
$stmt = $dbh->query($sql);
var_dump($stmt->fetch(PDO::FETCH_ASSOC));
all other RDBMS extension we have return null in this case, which seems
to be the right thing too ..
regards,
Lukas
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php