Hey everyone, I currently have image script and I need it to display 5 results at a time. I know how to display the 5 results, but it is only displaying 1. Here is the code:
PHP Code:
$sql = "SELECT id, url, images FROM imagedb LIMIT 0,5"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result);
print '<center><p><a href= "image.php?id=' . $row[id] . '"><img src="' . $row[images] . '"></a></p></center>';
It only displays one result. I would like it to display as many that are in the table (only 3 atm) and then I can actual limit some of the results down to 5 or 10. Thanks!
|