Title: Message
Thank you one and all its sorted now
taken out the pres and switched the =< => and correct record set.
 
 
final code
 
<cfset Form.age =5>
<!--- set age diff --->
<cfset Older = Form.age + 2>
<cfset Younger = Form.age - 2>
 
<!--- create the dates --->
<cfoutput>
<cfset Older = dateformat(DateAdd("yyyy", -Older, Now()),'yyyy-mm-dd')>
<cfset Younger = dateformat(DateAdd("yyyy",-Younger,Now()),'yyyy-mm-dd')>
get all records where member was born between #Older# and #Younger#
</cfoutput>
<cfoutput><pre>
<cfquery name="getRecord" datasource="interact">
 
 SELECT  Talent.talentID , 
  Talent.Name ,
  Talent.Gender ,
  Talent.DOB ,
  Talent.Hair ,
  Talent.Eye ,
  Talent.Height ,
  Talent.Clothessize ,
  Talent.shoesize ,
  Talent.hobbies ,
  Talent.BIO ,
  Talent.Compcard ,
  Talent.ID
 FROM   Talent
 where (Talent.DOB >= {d '#Older#'} and Talent.DOB <= {d '#Younger#'})
 
</cfquery>
 
Cheers
 
---
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