I'd be willing to bet that if the CFIF statement hurts performance it is by
a very small amount.

On 10/23/07, Ben Mueller <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I've become a convert to cfqueryparam after posting a question about it to
> this group several months back.  Since then, I've started wondering about
> the benefits of it if there are <cfif> statements in a <cfquery> block.  For
> example:
>
> <cfquery name="myname" datasource="myDB">
>
> SELECT email
>   FROM user u
> WHERE country = <cfqueryparam cfsqltype="cf_sql_varchar"
> value=#somecountry#>
> <cfif len(somestate)>
>    AND state = <cfqueryparam cfsqltype="cf_sql_varchar" value=#somestate#>
> </cfif>
> </cfquery>
>
> Does the presence of the <cfif> statement inside the cfquery block negate
> all the performance benefits I would have otherwise gained from using
> <cfqueryparam>?  If so, I would guess this is a common issue people run
> into.  Is there a best practice for handling this kind of situation?
>
> Thanks in advance,
> Ben Mueller
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291888
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