Is there anyway to turn the date() into a variable and pass it to the mysql_query(Select....)? I have my calendar db filled with music events. I want to keep old events present in the db but not on the webpage. Is there anyway for the script to load on the page only showing future events? Can anyone help me with this? Thank You in advance for any possible clue/s!
<ul type=\"circle\">
<?
date(\"D. m/d/Y\");
@ $db = mysql_pconnect(\"localhost\", \"user\", \"pass\");
if (!db)
{
echo \"Unable to connect to that darn server. Go back and try again.\";
exit;
}
mysql_select_db(\"calendar\", $db);
$result = mysql_query(\"select venue.name, venue.street, venue.City, venue.directions, event.date, event.start, event.sm, event.end, event.em, DATE_FORMAT(event.date,\'%a. %m/%d/%y\') AS fmt_date from venue right join event on event.venueid = venue.venueid order by event.date\");
$num_results = mysql_num_rows($result);
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_object($result);
echo \"<td>\";
echo stripslashes($row->fmt_date).\"\t\";
echo stripslashes($row->start);
echo stripslashes($row->sm).\"-\";
echo stripslashes($row->end);
echo stripslashes($row->em).\"\t\";
echo stripslashes($row->name).\" - \";
echo stripslashes($row->street).\" \t \";
echo stripslashes($row->City).\" - \";
echo stripslashes($row->directions).\"\t<br><br>\";
}
?>
</ul>