Ask a Question related to Coldfusion Database Access, Design and Development.
-
Jared@Itron #1
Using variable in sql query
Hello again,
I'm trying to run an sql query using a string as in the following:
<cfset string = "address1=' #evaluate("form.param#count#")# ', ">
UPDATE philly_reads
SET
#string#
WHERE masterid = '#form.masterid#'
form.parm#count# corresponds to some inputs on the prior page of my site that
i just named param1, param2, etc in a loop
The problem is when i run the SQL query it replaces the single ' with " in
string as in:
address1=''01057 AL'',
This obviously throws an error. Does anyone know how to make SQL take the
single quotes as is? Thank you for any help you may give.
-Jared
Jared@Itron Guest
-
PARSING A QUERY OF QUERY WITH A VARIABLE VALUE
On my first page the user selects a project. I am using the variable SelectedProject: <cfset SelectedProject =... -
Using a Variable to create the SQL Query
I need to create a "dynamic" Update query. I want to store the meet of the command in a variable and then reference the variable in in query. ... -
Passing a variable to a query
<cfset ctr=1> <cfloop list="#query1#" index = "i" delimiters = ","> <cfset thisColumn = "subcat_"&#ctr#> <cfquery name="insertNodes"... -
Help with variable query?
I'm having an arbitrary query input by the user, then to make that query into an excel file it must be put into a table similar to below. Since I... -
Variable Syntax Query
I'm building a button bank of 6 buttons whereby pressing one button releases the last button activated. Each button is it's own movie clip named... -
Dan Bracuk #2
Re: Using variable in sql query
The PreserveSingleQuotes function handles this quite nicely.
Dan Bracuk Guest



Reply With Quote

