Mysql
 sql >> Datenbank >  >> RDS >> Mysql

mysql select nur Daten der nächsten Woche

set @d := date_add(CURRENT_DATE, interval 7 day);
set @week_start := @d - interval (dayofweek(@d) + 1) day;
set @week_end := @d + interval (6 - dayofweek(@d)) day;
SELECT *,
       DATE_FORMAT(film_release_date,'%e-%b-%Y') AS release_date
FROM gf_film
WHERE film_release_date between @week_start and @week_end
ORDER BY film_release_date DESC