There's absolutely no reason to use CFQUERYPARAM in that scenario
though, so why bother?  CFQUERYPARAM does variable binding for the
database.  The main purpose is to allow the statement to be cached
(kind of ;) without any dynamic pieces, and then have the dynamic
pieces inserted on the fly (the bind variables).  That has the nice
side effect of avoiding SQL injection attacks as well, because by the
time the values are injected, the SQL engine has already done
everything, so there's no way for any SQL in a value to be executed.

With literal values, you don't have either of those problems, so using
CFQUERYPARAM is entirely superfluous.

cheers,
barneyb

On 6/27/05, Aaron Rouse <[EMAIL PROTECTED]> wrote:
> But then you might forget to use them when you key in some literals, such
> as:
>  SELECT ID, BLAH FROM MYTABLE WHERE MYSTATUS = <cfqueryparam value="1"
> cfsqltype="cf_sql_numeric" />
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210621
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to