Arden Weiss wrote:
> 
> So far I've only used single <CFIF statements - hence don't know syntax for
> multiple conditions and haven't been able to find an example in the books I
> have.
> 
> Can someone give me a hint or example of the CF syntax to do state the
> following condition:
> 
> <CFIF mTEST1 EQ "ABC" AND mTEST2 EQ "DEF">
> 
> without using nested <CFIF statements???

What you just did is about right. I think you should be using IS instead
of EQ for those comparisons. I might put parentheses around each
condition but in this case it isn't necessary. 

If you're using 4.0 you don't have short-circuit processing so if you
try
<cfif IsDefined("myvariable") and myvariable is "yes">
if myvariable isn't defined then you'll throw an error. Other than that
you should be fine.

Just make sure you use parentheses to do things like
<cfif mtest1 is "ABC" or (mtest2 is "DEF" and mtest3 is "GHI")>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to