I want to show four random ad spots at top of page (simplified code)
:
$result = mysql_query("SELECT id, company, spot FROM $mysql_tbl_spot ORDER BY RAND() LIMIT 4");
for ($i=0;$i<mysql_num_rows($result);$i++) {
list($spotid, $comspot, $spoturl) = mysql_fetch_row($result);
print "<td align=center valign=top><a href=\"click.php?spotid=$spotid&comid=$comspot\"><img src=\"$spoturl\" width=\"125\" height=\"50\" border=\"0\" alt=\"Click here\"></a></td>\n";
Then, after the main text, etc., I want to show another four random ad spots at the bottom of the page. Presumably I need a fresh query. How do I do that without repeating the same ad spots I've already shown at the top of the page?
I'm sure it's simple but I'm flummoxed! Any help would be really appreciated. Thanks. 🙂