note 30940 deleted from function.msql-numfields by didou
| From: | didou@php.net | Date: | Mon, 04 Apr 2005 22:07:24 +0000 |
| Subject: | note 30940 deleted from function.msql-numfields by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87459@lists.php.net to get a copy of this message | ||
Note Submitter: fredrik
----
It's very simple to print out the result of any query.
$result = query("$query");
if(mysql_numrows($result)) {
echo("<table>");
for($i = 0; $i < mysql_numrows($result); $i++) {
echo("<tr>");
for($j = 0; $j < mysql_numfields($result); $j++) {
echo("<td>" . result($result,$i,$j) . "</td>");
}
echo("</tr>");
}
echo("</table>");
}