i have this..
$thismonth=(int) date("m");
$thisyear=date("Y");
$sql=@mysql_query("SELECT id,dateday,datemonth,dateyear FROM events WHERE dateyear=".$thisyear." AND datemonth=".$thismonth."");
$eventdate=@mysql_fetch_array($sql) or die(mysql_error()) ;
and then somewhere down the lines i have this...
if($eventdate['dateday'] == $counter) {
echo "<a href=\"events/index.php?id=".$eventdate['id']."\">$counter</a></td>\n";
} else {
echo "$counter</td>\n";
}
OK so on the if statement it only links ONE of the dates, not all of them that should be. I want it to coordinate every day on a calendar that has a day in the database to link to its id. Say there's two different dates in Jan., they should both be linked on the appropriate day, but only the last one is linked. Should there be a while or for statement somewhere? I'm not sure =\