Hello,
I've read and used the birthday solutions of Wolfgang Führer from the mySQL
DATE examples on the mysql.com website.
SELECT naam, gebdatum FROM users WHERE gebdatum != '0000-00-00' AND ((
DAYOFYEAR(gebda tum) < DAYOFYEAR(now() ) )*366)+DAYOFYEA R(gebdatum) >=
DAYOFYEAR(now() )ORDER BY (( DAYOFYEAR(gebda tum) <
DAYOFYEAR(now() ) )*366)+DAYOFYEA R(gebdatum)
But I discover a problem:
When you have birthdates in your table in the same month, not on the same
day but before 1970 and after 1970. The query result give first the bithdays
after 1970 and then the ones before 1970.
For example:
Ria | 1947-03-20
Linda | 1967-03-22
Esther | 1977-03-24
Agnes | 1978-03-24
Frans | 1944-03-23
Annie | 1936-03-25
Wendy | 1977-03-26
Does anyone discoverd the same problem and is there a solution for this?
Best Regards,
Peter
I've read and used the birthday solutions of Wolfgang Führer from the mySQL
DATE examples on the mysql.com website.
SELECT naam, gebdatum FROM users WHERE gebdatum != '0000-00-00' AND ((
DAYOFYEAR(gebda tum) < DAYOFYEAR(now() ) )*366)+DAYOFYEA R(gebdatum) >=
DAYOFYEAR(now() )ORDER BY (( DAYOFYEAR(gebda tum) <
DAYOFYEAR(now() ) )*366)+DAYOFYEA R(gebdatum)
But I discover a problem:
When you have birthdates in your table in the same month, not on the same
day but before 1970 and after 1970. The query result give first the bithdays
after 1970 and then the ones before 1970.
For example:
Ria | 1947-03-20
Linda | 1967-03-22
Esther | 1977-03-24
Agnes | 1978-03-24
Frans | 1944-03-23
Annie | 1936-03-25
Wendy | 1977-03-26
Does anyone discoverd the same problem and is there a solution for this?
Best Regards,
Peter