Bingo!
The mixed case of <CFIF> and <cfif> tricked us all!
Sarah Atkinson
Global Applications Team Leader
Lonely Planet Publications, Aust.
Telephone: +61 3 8379 8000
[EMAIL PROTECTED]
-----Original Message-----
From: Adam Chapman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 19 March 2003 2:19 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: look up date by years old with a 2 year spread < 2 > 2
Hi Greg,
<CFIF Form.OlderThan AND Form.YoungerThan>
AND dob BETWEEN DateAdd(Year,#Form.OlderThan#,dob) AND
DateAdd(Year,#Form.YoungerThan#,dob)
<cfif> <-- this should be a closing cfif tag!
Seeeeya,
Adam
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, 19 March 2003 2:10 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: look up date by years old with a 2 year spread <
2 > 2
Hi steve
still got the error
if i remove the red part of the query it runs fine , so its something in
that part of the code thats falling over.
<cfset Form.OlderThan =5>
<cfset Form.YoungerThan =1>
<cfset form.search = "yes">
<cfset form.gender = "male">
<cfset form.hair = "">
<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>
<CFIF ParameterExists(form.search)>
AND Talent.gender = '#form.gender#'
REMOVED THIS BIT AND I GET NO ERROR ON <CFIF
ParameterExists(form.search)>
<!--- 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>
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. |
