OK rudy, I've got to this (via a few other things)

SELECT  `first_n` ,  `last_n` ,  `email_address`
FROM  `loop_allname`
WHERE datediff( date_add( ( select `birth` ),  INTERVAL year(
urrent_date )  - year(   select `birth` ) ) years ) , current_date )
BETWEEN 0  AND 1  OR datediff( date_add( ( select `birth` ),  INTERVAL
year( current_date )  + 1 - year(   select `birth`  ) years ) ,
current_date )
BETWEEN 0  AND 1

And I've tried calling the date from the table with '`birth`', 'select
`birth`', 'select `birth` from loop_allname' and a few others, but I'm still
getting this:

#1064 - You have an error in your SQL syntax.  Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'( date_add(  ' `birth` '  ) ,  INTERVAL year( current_date )  -

I have tried to follow your prescription and interpret the MySQL manual, and
looked for googled guidance but nothing yet pleases!

>
> select name, birthdate
>   from yourtable
>  where datediff(
>          date_add(birthdate
>            , interval year(current_date)
>                      -year(birthdate) year )
>          , current_date )
>              between 0 and 10
>     or datediff(
>          date_add(birthdate
>            , interval year(current_date) + 1
>                      -year(birthdate) year )
>          , current_date )
>              between 0 and 10


____ • 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