Hi
Query by years old on dob field
 
search by  years old with a 2 year spread each side of there date of birth .
 
eg: 5 years old  Query = select any member between 3 years and 7
 
The data base is set-up with DOB field
eg  31/12/1997 Query = select any user between 31/12/1995 and 31/12/1999
 
 
I cant work out the less than 2 years and more than 2 years with the date field
 
i would like to send a number to the query but it could be a year or????
 
Hope all this is clear and thanks in advance if anyone can help on my short comings with date issues and queries.
 
 
<CFQUERY name="getRecord" dataSource="interact">
 SELECT Talent.talentID , Talent.Name , Talent.Gender , Talent.DOB , Talent.Hair , Talent.Eye , Talent.Height , Talent.Clothssize , Talent.shoesize , Talent.hobbies , Talent.BIO , Talent.Compcard , Talent.ID
 FROM Talent
 <CFIF ParameterExists(url.ID)>
 WHERE Talent.ID = #url.ID#
 </CFIF>
 
 <CFIF ParameterExists(form.search)>
 WHERE  Talent.gender = '#form.gender#'
 
<CFIF form.dob IS NOT "">
 and talent.dob  is #form.dob#  ( could be a number or a year )
 </CFIF>
 
<CFIF form.hair IS NOT "">
 and talent.hair = '#form.hair#'
 </CFIF>
 
 </CFIF>
 
</CFQUERY>
 
 
 
Kind Regards
Greg Stone
Australian Business Web
www.abw.net.au
[EMAIL PROTECTED]
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to