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:291885 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

