From: Flashdakota on
Hi

I have a problem.
I have the following
<cfset newcolor = "000000">

<cfquery name="UpdateColor" datasource="#application.db#">
UPDATE tblsites
SET SBGCOL = '#newcolor#'
WHERE USERID = #session.userid#
</cfquery>

...HOWEVER, i want to insert a # before posting the color var!

Please can someone explain how to do this!

Thanks in advance
Delon



From: Ian Skinner on
Flashdakota wrote:
> Please can someone explain how to do this!

You escape it so that ColdFusion knows it is not a variable delimiter.
In ColdFusion you escape control characters by doubling them.

I.E.

SET SBGCOL = '###newcolor#'.
From: Dan Bracuk on
Use two of them.
From: Flashdakota on
Thanks.

I feel kinda stupid now!
It works 100%

 | 
Pages: 1
Prev: CFGRID
Next: Insure file exists before displaying