note 11219 added to pg_fetch_object

From: Date: Sat, 10 Feb 2001 20:21:38 +0000
Subject: note 11219 added to pg_fetch_object
Groups: php.notes 
Request: Send a blank email to php-notes+get-10884@lists.php.net to get a copy of this message
Or to avoid the stupid warning error message that will generated with the above code, do something like: $num = pg_numrows($db_result); for ($row = 0; $row < $num && $db_data = pg_fetch_object($db_result, $row); $row++) { // your code here } A side note for developers: You might want to remove that /extremely/ annoying warning message. If the row you're requesting doesn't exist, the function returns FALSE, isn't that good enough? Or at least include a mechanism to disable the warning. http://www.php.net/manual/en/function.pg-fetch-object.php

« previous php.notes (#10884) next »