I'm writing an event calendar program where I have a table with some descriptions and associated ID numbers and a beginning date. In another table are corresponding end dates. What I'm trying to do is: if todays date falls between today and the end date, display the description. There may be multiple events. My code below works in getting the correct descriptions but it repeats the descriptions over and over. Obviously I'm looping incorrectly but I can't figure out why. Any help would be appreciated. Thanks.
//$date equals todays date. All dates are in yyyymmdd format
$query = mysql_query("select tbl1_description, tbl1.start_date, tbl2.end_date from tbl1, tbl2 where ('$date' >= tbl1.start_date and '$date' < tbl2.end_date)") ;
$result = $query;
while ($row = mysql_fetch_array($result)) {
echo $row["description"];
}