Hi,
I have this SQL query about getting the 5 events today:
SELECT n.nid, n.type, n.title, nr.body, nr.teaser, FROM_UNIXTIME(e.event_start) start_date, FROM_UNIXTIME(e.event_end) end_date
FROM node n
LEFT JOIN event e ON n.nid = e.nid
LEFT JOIN node_revisions nr ON nr.nid = e.nid
WHERE n.`type` = 'event'
AND NOW() BETWEEN FROM_UNIXTIME(e.event_start) AND FROM_UNIXTIME(e.event_end)
ORDER BY n.`created` DESC
LIMIT 5
Then I need to get the "this week's event" using "a week that includes "today" and starts on a Sunday".
How can I do that in MySQL?
Any help would greatly be appreciated. Thanks in advance :)
Cheers, Mark