I'm missing something. How do I apply a GET command for this code?
$query = ("SELECT * FROM myimage ");
//THE ABOVE IS MY TABLE SELECTION.
$result = mysql_query($query) or die("Query failed : " . mysql_error());
//THE ABOVE IS MY QUERY.
$num_rows = mysql_num_rows($result);
//THE ABOVE TELLS ME THE TOTAL NUMBER OF ROWS QUERIED.
//I WAS TRYING TO TAKE THAT TOTAL FROM $num_rows AND
//LETS SAY 123 ROWS AND HAVE PHP LOOP THROUGH IT
//DISPLAYING ON IMAGE ON THE SCREEN AT A TIME. THESE
//IMAGES ARE NOT STORED IN ANY FILES LIKE HTML OR PHP.
//JUST THE LINKS ARE STORED IN THE myimage TABLE.
echo "$num_rows Rows\n";
//THE ABOVE JUST DISPLAYS THE NUMBER OF ROWS. ITS NOT
//REALLY NECESSARY.
while ($row= mysql_fetch_array($result))
/THE ABOVE SIMPLY RETRIEVES THE ROWS.
{
print "<table width=75% border=1>\n";
print "<td width=8%>";
echo '<img src=' .$row['imagefilepath']. '>';
print "</td>";
}
//THE ABOVE SIMPLY DISPLAYS THE LINKED IMAGES.
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($db);
?>
I tried to run an increment statement in the While loop. Sure, it counts but I it's generally doing the same thing as the $num_rows = mysql_num_rows($result);.
Is there anything that I could plug within this code for it to work? Again, I simply want to be able to scroll through this database displaying on record at a time.
Any assistance would be appreciated.
Thanks
KJ