I believe the brackets are absolutely neccessary due to the AND operator
having precedence over the OR operator.

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000930.htm

To simplify:


> if (x eq 1 OR x eq 2 AND y eq 5)
>

Is the same as:


> if (x eq 1 OR (x eq 2 AND y eq 5))


So you would need (as you correctly wrote):


> if ((x eq 1 OR x eq 2) AND y eq 5)


<cfif (getSection.DeliveryMethod EQ "Web-Enhanced" OR
> getSection.DeliveryMethod EQ "Hybrid") AND
> getWebEnhancedAddonQuestions.recordcount>



Dom


On 17/08/07, Will Tomlinson <[EMAIL PROTECTED]> wrote:
>
> Easy question here... just wanna make sure I don't screw this up cause
> it's kinda important.  :)
>
> Here's my current statement.
>
> <cfif getSection.DeliveryMethod EQ "Web-Enhanced" AND
> getWebEnhancedAddonQuestions.recordcount>
>     Show questions blah blah...
> </cfif>
>
> What I need it to say is, if the delivery method is "web-enhanced" OR
> hybrid.
>
> Would you just stick it in there? Or use parenthesis around those two
> items?
>
>
> <cfif (getSection.DeliveryMethod EQ "Web-Enhanced" OR
> getSection.DeliveryMethod EQ "Hybrid") AND
> getWebEnhancedAddonQuestions.recordcount>
>     Show questions blah blah...
> </cfif>
>
> Or, do I even need the parenthesis.
>
> It takes quite a bit of time to test this thing, or else I'd be testing
> instead of asking you guys.  :)
>
> Thanks,
> Will
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286461
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to