Hello Vinzenz,
nun dachte ich, so müsste es funktionieren, aber nun bekomme ich die Fehlermeldung
ERROR 1305 (42000): FUNCTION test.datediff does not exist
[code lang=sql]
select * from zeit
where datediff
(
date_add(now(), interval 7 day),
if(
month(birthday) = 2 and day(birthday)= 29 and DAYOFYEAR(CONCAT(YEAR(NOW()),'-12-31')) = 365,
concat(YEAR(NOW()),'-03-01'),
if(
month(now()) = 12 and day(now()) > (31-7),
concat((YEAR(NOW())+1),'-',month(birthday),'-',day(birthday)),
concat(YEAR(NOW()),'-',month(birthday),'-',day(birthday))
)
)
)
between 0 and 7
;
Was habe ich denn nun übersehen?
Liebe Grüße aus dem schönen Oberharz
Tom vom Berg