Jump to content

SQL Query, well, Query...


umbrella_thing

Recommended Posts

Hi guys,
I'm designing a website that involves events that happen on a certain date.
Now, I don't want to show the old events on my site so I made this query...
But I want to show the next 3 upcoming events...

[code]
SELECT event_name, event_id, event_date, DATE_FORMAT(event_date, '%d/%m %l:%i') as date
FROM `event`
WHERE `event_date` > '$now'
ORDER BY `event_date`, `event_time`
LIMIT 3
[/code]

I'm sure there is a simple solution for it, could anyone help?

Thanks!
Link to comment
https://forums.phpfreaks.com/topic/6557-sql-query-well-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.