I have a database that has a year row in it and it can be full of diffterent 4 digit years, then i want to to a query and display all the years I have in the DB, but do not want to show duplicates.
The below can show 2009 | 2009 | 2008 | 2009 | 2008 which i want to only show 2009 | 2008
$query = "select * from events";
$result = MySQL_query($querys);
$YEARS = "";
While( $row = MySQL_fetch_array($result) ) {
$YEARS .= '<a href="./reports.php?table=events&year='.$rows[yr].'">'.$rows[yr].'</a>';
}
echo $YEARS;