I have a db of events, and I'd like to sort the events by date, and not display a record if the date has already passed.
What is the proper comparison of dates?
Here is the code that just spits out the info in the table. I have formatted the date.
$result = mysql_query ('SELECT title, date_format(date,"%W, %M %e, %Y") as date, place, copy, cost FROM dev_wren_events');
while ( $query_data = mysql_fetch_array($result) ) {
print date();
if ($query_data['date'] > getdate()) {
echo '<div class="titleHeader">', $query_data['title'], "</div>", $query_data['date'], "<br>", $query_data['place'], "<br><br>", $query_data['copy'], '<br>', $query_data['cost'], '<br><br><br>';
}} ?>
If you have any ideas, please help!
Thanks ver y much,
Jae