I'm trying to find a way where I can use the limit command to print one image on the screen at a time. Lets say, the database has 113 records, but more records are constantly being added.
I would like the image appearon the screen and when the user inserts something into the table, the next record with the image appears and so on. I know LIMIT come into play here, but where do I place this command so that perhaps it can loop until the last record of the database.
Here's a sample of the code below;
I was thinking something like
$page=0+1;
The above would increase in to loop for LIMIT command.
$query = ("SELECT * FROM myimagexx " limit $page,1);
$result = mysql_query($query) or die("Query failed : " . mysql_error());
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
while ($row= mysql_fetch_array($result))
{
print "<table width=75% border=1>\n";
print "<td width=8%>";
echo '<img src=' .$row['imagefilepath']. '>';
print "</td>";
}
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($db);
?>
I hope I was clear. Any assistance would be helpful.
Thanks.
KJ