Hi Olaf, try something like this:
AND gebdatum between now() and date_add(now(),interval 7 day) However, I have no idea if this can be done with 3.23.49a. -- Peter Sap. ----- Original Message ----- From: "Olaf van Zandwijk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 17, 2003 5:39 PM Subject: Birthday calendar > Hello, > > I want to have a query that returns the names from people that are > having their birthday one of the coming 7 days. I currently have a buggy > query that deals with this, but that query fails when the birthday is > the next month, and we're now in the last week of the month before. > > Can anyone give me a hint in the right direction to do this? I'm using > MySQL 3.23.49a, and it's not (yet) possible to use MySQL 4 > > Grtz, > \Olaf > > SELECT month(gebdatum) AS maand, > dayofmonth(gebdatum) AS dag, > achternaam, > CONCAT(roepnaam, ' ', COALESCE(tussenvoegsel, ' '), ' ', achternaam) AS naam > FROM persoon, > WHERE YEAR(gebdatum) IS NOT NULL > AND <This part of the query needs to be redone> > AND CONCAT(roepnaam, ' ', COALESCE(tussenvoegsel, ' '), ' ', achternaam) > IS NOT NULL > ORDER BY maand, > dag, > achternaam > > -- > __XXX__ > (0-0) > +--ooO--(_)--Ooo-------------------------------------------------------+ > | | > | Olaf van Zandwijk | > | | > | ICQ# 30231605 | > | PGP Public Key: http://www.vanzandwijk.net/pgp.txt | > +----------------------------------------------------------------------+ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]