note 51207 added to function.pg-num-rows
| From: | dot) | Date: | Wed, 23 Mar 2005 15:16:48 +0000 |
| Subject: | note 51207 added to function.pg-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86845@lists.php.net to get a copy of this message | ||
Yet even simpler example:
$query = "SELECT * FROM atable";
$result = pg_query($query);
if (pg_num_rows($result)>0) {
while($row=pg_fetch_object($result) {
echo $row->first_column;
echo $row->second_column;
....
echo $row->last_column;
}
}
else {
echo "The query did not return any data!";
}
----
Manual Page -- http://www.php.net/manual/en/function.pg-num-rows.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51207
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51207&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51207&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51207&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51207&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51207&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51207&report=yes
Search -- http://master.php.net/manage/user-notes.php