Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24033 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40471 invoked by uid 1010); 9 Jun 2006 12:22:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40456 invoked from network); 9 Jun 2006 12:22:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2006 12:22:27 -0000 X-PHP-List-Original-Sender: lsmith@php.net X-Host-Fingerprint: 212.112.227.169 ipx11223.ipxserver.de Linux 2.5 (sometimes 2.4) (4) Received: from ([212.112.227.169:47489] helo=ipx11223.ipxserver.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3D/D4-30619-20869844 for ; Fri, 09 Jun 2006 08:22:26 -0400 Received: from localhost (localhost [127.0.0.1]) by ipx11223.ipxserver.de (Postfix) with ESMTP id AFD02DF0007 for ; Fri, 9 Jun 2006 14:23:38 +0200 (CEST) Received: from ipx11223.ipxserver.de ([127.0.0.1]) by localhost (ipx11223 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04518-08 for ; Fri, 9 Jun 2006 14:23:30 +0200 (CEST) Received: from [127.0.0.1] (i577B5B6A.versanet.de [87.123.91.106]) by ipx11223.ipxserver.de (Postfix) with ESMTP id 066B6DF006F for ; Fri, 9 Jun 2006 14:23:30 +0200 (CEST) Message-ID: <448967F6.4040003@php.net> Date: Fri, 09 Jun 2006 14:22:14 +0200 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by somedaemon at backendmedia.com Subject: [Fwd: fetch() returning false for empty datasets] From: lsmith@php.net (Lukas Smith) 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: lsmith@php.net (Lukas Smith) To: pecl-dev@lists.php.net 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