Hi,
I'm trying to use the following code to display the first three results from a mySQL query :
$i = 1;
if ($myrow = mysql_fetch_array($books)) {
do {
printf("<IMG SRC=\"../images/new02.gif\"><A HREF=\" %s \">%s</A> - \"%s\"<br>\n", $myrow["URL"], $myrow["Title"], $myrow["Description"]);
$i++;
} while ($i <= 3);
} else {
echo "Sorry, no books were found!";
};
What I have give me the same results over and over...the first record in the table. I'm missing something pretty obvious here, but am not sure what it is. Any help is appreciated! Thanks!