note 51207 deleted from function.pg-num-rows by felipe
| From: | felipe@php.net | Date: | Sat, 15 Dec 2007 15:11:40 +0000 |
| Subject: | note 51207 deleted from function.pg-num-rows by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133547@lists.php.net to get a copy of this message | ||
Note Submitter: php-docs (at) radev (dot) net
----
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!";
}