How do I get all records from a table from this week and the next 3 weeks, in total 4 weeks. This will gave me this week.
SELECT *, FROM_UNIXTIME(date) as time FROM `events` WHERE
WEEK(FROM_UNIXTIME(date)) = WEEK(NOW())
AND MONTH(FROM_UNIXTIME(date)) = MONTH(NOW())
AND YEAR(FROM_UNIXTIME(date)) = YEAR(NOW())
Any ideas on how to get the data for the next 3 weeks.
1条答案
按热度按时间vuktfyat1#
Use a time range: