note 47406 added to function.pg-fetch-row
| From: | Kestrell at osu1 dot php dot net | Date: | Mon, 15 Nov 2004 18:36:58 +0000 |
| Subject: | note 47406 added to function.pg-fetch-row | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-80552@lists.php.net to get a copy of this message | ||
I found that in the official example the code:
while ($row = pg_fetch_row($result, $i)) {
for ($j=0; $j < count($row); $j++) {
echo $row[$j] . " ";
}
didn't work.
I had to do:
for ($i=0; $i < pg_num_rows($result); $i++)
{
$row = pg_fetch_row($result);
for ($j=0; $j < count($row); $j++) {
echo $row[$j] . " ";
}
}
----
Manual Page -- http://www.php.net/manual/en/function.pg-fetch-row.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47406
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47406&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47406&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47406&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47406&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47406&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47406&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47406&report=yes
Search -- http://master.php.net/manage/user-notes.php