Ask a Question related to Coldfusion Database Access, Design and Development.
-
Clacker #1
cfqueryparam usage
Hello,
Ive been tightening up my querys using the cfqueryparam tag and it does also
seem to help greatly with speed.
Is it worth using cfqueryparam on ALL variables handed in to a query then?
(even in inserts and updates if this is possible?) i.e.
<cfquery name="myquery" datasource="myDB">
INSERT INTO people (Name, Age)
VALUES (<cfqueryparam value="InputName" cfsqltype="cf_sql_char">,
<cfqueryparam value="InputAge" cfsqltype="cf_sql_integer">)
</cfquery>
or...
<cfquery name="myquery" datasource="myDB">
UPDATE people SET Age = <cfqueryparam value="NewInputAge"
cfsqltype="cf_sql_integer">
WHERE Name = <cfqueryparam value="InputName" cfsqltype="cf_sql_char">
</cfquery>
Some of the bigger queries are going to start looking mighty complex then.....
but if it speeds it up....
Clacker Guest
-
Error With CFQUERYPARAM
Here is an error that only exists when cfqueryparam is used. The code below throws an error in the *second* query if the *first* query contains... -
cfqueryparam
Hi, I am trying to take values passed through a form and do a search based on that, but I am getting an error Error Executing Database Query.... -
CFQUERYPARAM Error
Hello, I am using MX7 and am having problems with cfqueryparam. I am new to a project and the old code does not use them and everything I have... -
cfqueryparam question
Hi, all. I am not too sure where to put the cfqueryparam in my code below. Alos for for this code: where id =... -
cfqueryPARAM problem
Viva Coldfusion Forum - 'Kudos to all who help out in the time of trouble for they shall be rescued in theirs' I am concatenating an sql statement... -
Dan Bracuk #2
Re: cfqueryparam usage
How fast does it take you to insert or update a record now?
Dan Bracuk Guest
-
mxstu #3
Re: cfqueryparam usage
CFQUERYPARAM uses bind variables (if your database supports them) which should
provide a speed increase for queries that are executed multiple times because
the execution plans can be reused. Whether or not to use it is your decision,
but MM also recommends using it for security reasons as well as performance.
mxstu Guest



Reply With Quote

