I am trying to use the select distinct feature in a stats program I am writing. I want it to first select the distinct pages listed in the table, then output a link that will show the work for that one page. Here is the code that I have thus far, please let me know how to make it work 🙂
$query1 = mysql_query("SELECT DISTINCT page FROM fpu_stats");
$while ($row1 = mysql_fetch_array($query1)) {
$page = $row1[page];
?>
<tr>
<td align="left" valign="center"><a href="stats.php?page=<? echo $page ?>"><? echo $page ?></a></td>
</tr>
<?
}
?>
Thanks everyone