Okay so am using this structure in my SQL database:
id | title | date_start | date_end| time_start | time_end | location |
I am wanting to sort data from that table, but only the upcoming dates or dates that are currently occurring.
I've used the following query in php:
$query = mysql_query("SELECT * FROM events3 ORDER BY date_start DESC LIMIT 5");
Then after the query I fetched the results, then echoed them as so:
That would display the only two dates in the database as:
ID: 2
Title: New Years Eve
Date Start: 2012-12-31 - 2012-12-31
Time Frame: 12:00:00 - 12:00:00
Location: Earth
Description: The last day of 2012.
ID: 1
Title: Christmas Day
Date Start: 2012-12-25 - 2012-12-25
Time Frame: 12:00:00 - 12:00:00
Location: Earth
Description: Merry Christmas!!
But I want it to expire after the date has occurred and only show the next upcoming ones.