Joseph Harris wrote:

I am still finding the suggestions so far, and any scripts I have been able
to find, don't address what I want - not efficiently anyway.   DATE_FORMAT()
will convert to useable data from DATE or DATETIME, but then this has to be
processed again to extract the instances of the date required.   That might
be ok for a couple of hundred records.

But let us say there are 10,000;  I want all the emails of 1/365th of the
entries each day.   There will be nothing else I want to do with the
birthdata.   So, despite rudy's insistence, I still think that three
columns - year, month, day - will enable much more rapid extraction and
avoid confusion with the year.

AmI wrong, or is it just a matter of preferences (i.e will I trip up with my
idea?).

Joseph

Joseph Harris
www.smilepoetryweekly.com
OK, I've no idea what you've been trying to achieve and I'm too lazy to read the archives (!), but I assume that you're trying to extract data to send a "happy Birthday" greeting or similar.

I recommend the following:

1. Store all dates in your database as a unix timestamp. This can then be manipulated by just about any (sensible) programming language such as PHP/Perl/Python/etc [1]

2. To setup your greeting, create a timestamp using the current date:

$today =  mktime()

and then compare this to the records -

SELECT * FROM people WHERE birthday = $today;

3. Send a greeting to all the results that are returned.

You might have to play around with the mktime() function to ensure that it is for the entire day and not just that second, but it should work.

HTH,

Matt

____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to