Hi Donna,

If you're testing multiple simple conditions, I think cfSwitch is
usually preferred.  Speed is sort of a moot point once it's compiled.

Because cfSwitch allows multiple true conditions per case (<cfcase
value="1,2">), and a defaultcase, it's pretty flexible, and easily
readable.

-joe



On Thu, 7 Oct 2004 11:46:12 -0500, Donna French <[EMAIL PROTECTED]> wrote:
> I have a scenario where I need to display different results for
>  product details, and would like to find out which would be most
>  efficient to use.
>  
>  I've always used CFIF but wanted to find out along the way while
>  completely redeveloping this app - code and db - which one is best.
>  
>  Here's the basic idea-
>  
>  <CFIF TypeID = 0>
>    Use Default Layout
>  <CFELSEIF TypeID = 1>
>    Use Layout 1
>  <CFELSEIF TypeID = 2>
>    Use Layout 2
>  </CFIF>
>  
>  I think that's enough for you to understand what I mean. The #TypeID#
>  and #Layout# will come from a table that could have an unlimited
>  number of results, so I'd like to use the option best for dynamic
>  results.
>  
>  Thanks for your help,
>  Donna
>  
>  --
>  ------------------------
>  Donna French
>  [EMAIL PROTECTED]
>  
>  Blog: http://dgfrench.blogspot.com
>  Site: http://www.dgfrenchdesigns.com________________________________
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to