note 14969 added to function.pg-fetch-row.php

From: Date: Wed, 22 Aug 2001 21:39:23 +0000
Subject: note 14969 added to function.pg-fetch-row.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-17002@lists.php.net to get a copy of this message
a way to do this with 2 loops to insert data into a table... $num = pg_numrows($result); $col_num = pg_numfields($result); for ($i=0; $i<$num; $i++) { $line = pg_fetch_array($result, $i, PGSQL_ASSOC); print "\t<tr bgcolor=#dddddd>\n"; for ($j=0; $j<$col_num; $j++){ list($col_name, $col_value) =each($line); print "\t\t<TD ALIGN=RIGHT><FONT SIZE=1 FACE='Geneva'>$col_value</FONT></TD>\n"; } echo "<br>"; } http://www.php.net/manual/en/function.pg-fetch-row.php

« previous php.notes (#17002) next »