Re: Birthdays!
| From: | David Robley | Date: | Mon, 14 Oct 2002 22:53:36 +0000 |
| Subject: | Re: Birthdays! | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22393@lists.php.net to get a copy of this message | ||
In article <1034627641.1893.929.camel@localhost.localdomain>,
marcot@tabini.ca 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 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 website to remind me of birthdays.Suppose its simple to work
> > out manually, but then have to mess around with days a month etc.
> >
> > Thanks,
> >
> > Steve
> > XX
Break that down a bit further by searching on DAYOFYEAR(birthday) assuming
that birthday is in/converted to the right format for DAYOFYEAR
--
David Robley
Temporary Kiwi!
Quod subigo farinam