note 17535 added to function.pg-fetch-array
| From: | jesse at sokieserv dot dhs dot org | Date: | Thu, 13 Dec 2001 09:38:01 +0000 |
| Subject: | note 17535 added to function.pg-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-22573@lists.php.net to get a copy of this message | ||
As of PHP 4.1.0, you can now use code such as the following to iterate through a result set:
$conn = pg_connect("host=localhost dbname=whatever");
$result = pg_exec($conn, "select * from table");
while ($row = pg_fetch_array($result))
{
echo "data: ".$row["data"];
}
Can be a nice little time saver, PHP with MySQL has supported this for a while but I'm glad to
see it extended to PostgreSQL...
--
http://www.php.net/manual/en/function.pg-fetch-array.php
http://master.php.net/manage/user-notes.php?action=edit+17535
http://master.php.net/manage/user-notes.php?action=delete+17535
http://master.php.net/manage/user-notes.php?action=reject+17535