Honestly, for the specific scenario you provide (and also in general for
cfif vs cfswitch) I believe it all comes down to a matter of preference.
This is one of those things where the question "is one faster" doesn't
really apply, because if one *is* faster one would be hard pressed to
prove such to the point where it becomes a clear pointer that one should
always prefer method a over method b.

For what it's worth, I'd probably use cfswitch to do what you're laying
out below.  Either would would just as well.

-Patti

> 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