Re: [PHP-DB] Birthdays!

2002-10-14 Thread Marco Tabini
How about select * from table where birthday between now() and date_add(now(), interval 15 day); Assuming, of course, you're using MySQL. Cheers, Marco On Mon, 2002-10-14 at 16:20, Steve Vernon wrote: Hiya, Just wondering what is the best way to do this please. I have

Re: [PHP-DB] Birthdays!

2002-10-14 Thread Steve Vernon
Yeh but that does not take into account years does it? My table has there birth year, wont that mess it up and not work? I assume I need to do a function only on the months and days?? Thanks! Steve XX -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Birthdays!

2002-10-14 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... How about select * from table where birthday between now() and date_add(now(), interval 15 day); Assuming, of course, you're using MySQL. Cheers, Marco On Mon, 2002-10-14 at 16:20, Steve Vernon wrote: Hiya, Just

RE: [PHP-DB] Birthdays!

2002-10-14 Thread John W. Holmes
] Subject: [PHP-DB] Birthdays! Hiya, Just wondering what is the best way to do this please. I have various birthdays stored as dates including birth years. Just wondering is there a function, or an easy way to work out the birthdays in the next two weeks say. Just be nice on my

Re: [PHP-DB] Birthdays!

2002-10-14 Thread Michael Mauch
John W. Holmes [EMAIL PROTECTED] wrote: There has to be a better way than this, but this is what I came up with before dinner... $dayofyear = date(z); $daysinyear = (date(L))?366:365; $numover = ($dayofyear + 14) - $daysinyear if($numover 0) { $sql = DAYOFYEAR(dob) $numover