note 11219 deleted from function.pg-fetch-object by jimw
| From: | jimw@php.net | Date: | Wed, 02 Jan 2002 18:07:09 +0000 |
| Subject: | note 11219 deleted from function.pg-fetch-object by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24294@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.