macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: problem using DISTINCT

Subject: Re: problem using DISTINCT
From: "cf_dev2"
Date: Fri, 17 Aug 2007 15:34:15 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
> <cfif itisstandard NEQ "Yes">(standard)</cfif>
 I think the logic is reversed.  Shouldn't that be:    <cfif itIsStandard EQ 
"Yes"> ? 

 IIRC the value for a "Yes/No" fields is returned as a number and not a string: 
1 =  Yes, 0 = No.  So your cfif statement needs to determine whether the value 
is a 1 or 0, instead of "Yes" or "No"

 [b]<cfif ItIsStandard eq 1>[/b]Yes, it's standard<cfelse>NOT standard</cfif>

 But since its a boolean value, you don't actually need to say "EQ 1".  Its 
more intuitive to use just

 [b]<cfif ItIsStandard>[/b]Yes, it's standard<cfelse>NOT standard</cfif>






<Prev in Thread] Current Thread [Next in Thread>