note 62536 added to function.pdostatement-fetch

From: Date: Thu, 02 Mar 2006 20:46:44 +0000
Subject: note 62536 added to function.pdostatement-fetch
Groups: php.notes 
Request: Send a blank email to php-notes+get-104725@lists.php.net to get a copy of this message
WARNING: fetch() does NOT adhere to SQL-92 SQLSTATE standard when dealing with empty datasets. Instead of setting the errorcode class to 20 to indicate "no data found", it returns a class of 00 indicating success, and returns NULL to the caller. This also prevents the exception mechainsm from firing. Programmers will need to explicitly code tests for empty resultsets after any fetch*() instead of relying on the default behavior of the RDBMS. I tried logging this as a bug, but it was dismissed as "working as intended". Just a head's up. ---- Server IP: 216.194.113.175 Probable Submitter: 209.149.152.130 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.pdostatement-fetch.php Edit -- http://master.php.net/note/edit/62536 Del: integrated -- http://master.php.net/note/delete/62536/integrated Del: useless -- http://master.php.net/note/delete/62536/useless Del: bad code -- http://master.php.net/note/delete/62536/bad+code Del: spam -- http://master.php.net/note/delete/62536/spam Del: non-english -- http://master.php.net/note/delete/62536/non-english Del: in docs -- http://master.php.net/note/delete/62536/in+docs Del: other reasons-- http://master.php.net/note/delete/62536 Reject -- http://master.php.net/note/reject/62536 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104725) next »