Show records from now() till next 7 days in mysql

前端 未结 5 664
清歌不尽
清歌不尽 2020-12-29 07:22

I want to select rows from the datetime now till 7 days in the future, how can I do this? Read alot about the date function of mysql but cant figure it out, this is the MySQ

5条回答
  •  长情又很酷
    2020-12-29 07:57

    What i use to get all the data from 7 days back till now from the database:

    SELECT * FROM wedstrijden WHERE DATE(date_from_table) > CURDATE() + INTERVAL 7 DAY

提交回复
热议问题