Hi Greg,

 

Just skimming over your query quickly, but aren't your #'s in the wrong places?

 

e.g.

 

AND dob BETWEEN DateAdd(Year,#Form.OlderThan#,dob) AND DateAdd(Year,#Form.YoungerThan#,dob)

 

should be

 

AND dob BETWEEN #DateAdd(Year,Form.OlderThan,dob)# AND #DateAdd(Year,Form.YoungerThan,dob)#

 

Try fixing them up and you might have more luck.

 

Thanks,

Sarah.

 

Sarah Atkinson
Global Applications Team Leader

Lonely Planet Publications, Aust.
Telephone: +61 3 8379 8000
[EMAIL PROTECTED]

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 19 March 2003 1:49 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: look up date by years old with a 2 year spread < 2 > 2

 

Thanks steve

Ok i understand  number issue NOW .

but i still get the error on the <cfif>

 

The tag is not correctly positioned relative to other tags in the template: tag CFIF must have some content. This means that there must be at least one tag, some text, or even just whitespace characters between the <CFIF> and </CFIF> markers.

This problem may be due to a CFML comment that has no end comment mark.

The error occurred while processing an element with a general identifier of (CFIF), occupying document position (25:1) to (25:35).

Below the exact query

<cfset form.olderthan = 5 >
<cfset form.youngerthan = 1 >

<cfset form.gender = "male">
<cfset form.search = "yes">

 

<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
 WHERE 1=1
 <CFIF ParameterExists(url.ID)>
 AND Talent.ID = #url.ID#
 </CFIF>
 
LINE 25 <CFIF ParameterExists(form.search)>
  AND Talent.gender = '#form.gender#'
  <!--- Check for age --->
  <!--- If we want an age range --->
  <CFIF Form.OlderThan AND Form.YoungerThan>
   AND dob BETWEEN DateAdd(Year,#Form.OlderThan#,dob) AND DateAdd(Year,#Form.YoungerThan#,dob)
  <cfif>
  <!--- If we want all people younger than an age --->
  <cfif Form.YoungerThan AND NOT Form.OlderThan>
   AND dob < DateAdd(Year,#Form.YoungerThan#,dob)
  </cfif>
  <!--- If we want all people older than an age --->
  <cfif NOT Form.YoungerThan AND Form.OlderThan>
   AND dob > DateAdd(Year,#Form.OlderThan#,dob)
  </cfif>
  
   <CFIF form.hair IS NOT "">
   and talent.hair = '#form.hair#'
   </CFIF>
</CFIF>

 

</CFQUERY>

 

PS i owe you a bottle of your preffered posion for helping me out on this one.

what do you drink?

 

regards greg

---
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/

---
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/ ---
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/
______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.

<<attachment: image001.jpg>>

Reply via email to