<cfset ID = 1>
<cfset test="Hi, this line has a single quote [ ' ] in it. Didn't I tell you it did.">
<cfset updateValue = perserveSingleQuotes(test)>
<cfquery....>
UPDATE table
SET field = <cfqueryParam value="#updateValue#" cfsqltype="cf_sql_varchar">
WHERE ID = <cfqueryParam value="#ID# cfsqltype="cf_sql_integer">
</cfquery>
You will notice that I assigned the preserverSingleQuotes to a temp variable outside of the update query. There is a bug in some versions of CF where putting a preserveSingleQuotes function inside of the <cfqueryparam value> attribute causes an proliferation of single quotes after multiple updates to the same record. The work around is to do the perserveSingleQuotes as a separate step.
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

