Mega Code Archive
Mysql_fetch_row() fetches rows
Its syntax is: array mysql_fetch_row() (int result)
@mysql_connect("localhost", "root","") or die("Could not connect to MySQL server!");
@mysql_select_db("mydatabase") or die("Could not select database!");
$query = "SELECT * FROM mytable";
$result = mysql_query($query);
print "\n";
print "\nID | Title | MyValue | \n
\n";
while (list($id, $title, $myvalue) = mysql_fetch_row($result)) :
print "\n";
print "$id | \n$title | \n$myvalue | \n";
print "
\n";
endwhile;
print "
";
mysql_close();
?>