This problem probably has a simple solution, but I am just starting to write mySQL queries so I need a little help.
I am using the Super Cali Event calendar for a site that I am building. I have had no problems with posting, displaying or retrieving events. The problem comes when I include a box to the side in which I would like to display the 5 latest posted events. I have been able to write a query that calls up the title and date and then outputs them to a table inside the box. Works great! The only problem is that we are not seeing the latest events posted, rather the first 5 events.
Is there another parameter that I can insert into the query to retrieve the most recently posted events and display just those? I am thinking there should be, but in all my experimenting I have not been able to find a way that works. I'm sure one of you all would have a solution that you use every day.
Here is the query:
$query = "SELECT title AS event, DATE_FORMAT(date,'%M %d, %Y') AS day FROM events, dates WHERE events.event_id = dates.event_id LIMIT 5";
$result = @mysql_query($query);