
August 15th, 2011, 09:24 AM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
|
What data types require quotes actually depends on the database server you're using, not CF. However, generally it is things like char, varchar, and dates/times. You can check by running the SQL directly against your RDBMS using whatever tool they provide (Oracle TSQL command line, MS SQL Query tool, etc.)
You should ALWAYS use CFQUERYPARAM for ANY data that is coming from the outside. So if you are hard-coding a value you could get away with not using CFQUERYPARAM, but anything supplied by the user in the FORM, URL, or SESSION scope must be a bind variable. So if you're not sure, I would just use CFQUERYPARAM for everything, that way there is no doubt.
|