What I'm trying to accomplish is the following:
2003
July
5- Result
7- Result
August
10- Result
12- Result
Currently what I have is the following:
$space = ' ';
$cur_year= date('Y');
$result = mysql_query("SELECT DISTINCT i.racedate,r.racename FROM
crc1.race r, crc1.raceindex i
WHERE r.raceid = i.race_id AND date_format(i.racedate,'%Y') = '$cur_year'");
if (mysql_num_rows($result)>0){
echo '<b>'.date('Y').'</b><br/><br/>';
while ($row= mysql_fetch_array($result)){
echo '<b>'.date("F",strtotime($row['racedate'])).'</b>';
echo '<br/>';
echo date("d",strtotime($row['racedate']));echo $space;echo $row['racename'];
echo '<br/><br/>';
}//end while
}//end if
This displays the results as:
August
10- Result
August
11- Result
How do I correct this?