Ask a Question related to Coldfusion Database Access, Design and Development.
-
tlyost #1
cf with mysql, escaping chars
Hi all,
I am converting a rather larger parsing program from php to coldfusion. So
far so good, until I found where it inserts data into the database, the php
code calls mysqli_real_escape_string on the data first. Research reveals that
this php function "escapes" NUL, \n, \r, \, ', and ". Further reading
suggests that mysql requires these chars to be escaped.
Anyone know of an easy way to accomplish this in cf ?
tlyost Guest
-
Escaping characters in MySQL
CFMX works fine with MySQL database 99% of the time. However, when a field in a query includes an apostrophe, CF is escaping it in the Windows SQL... -
receiving ??? chars instead of "special" chars
Hello i have a strange problem i made a online catalogue and must submit orders to a remote server I need to connect to a remote webservice on ... -
Escaping <> chars in XML Attributes
I need to know if anyone out there knows of a utility that will allow me to enter/edit/save an xml doc so that it visually displays on the screen... -
Forms and escaping
Hi all I'm hoping this is a dumb question that someone can easily answer me, I'm not entirely sure you even need php to solve it, but still:... -
Escaping in VBScript
I am having a problem calling Stored Procedures: .... dim MyValue, MyOtherValue MyValue = "Bobby's value" MyOtherValue = Bobby's other value"... -
cf_menace #2
Re: cf with mysql, escaping chars
You'll probably want to use <cfqueryparam> on all your SQL statements in order
to properly handle datatypes and to keep your queries safe from SQL Injections.
The tag also handles escaping characters when needed.
Check
[url]http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/[/url]
wwhelp.htm?context=ColdFusion_Documentation&file=0 0000317.htm for more info.
INSERT INTO someTable
(
someColumn
)
VALUES
(
<cfqueryparam value="#someVariable#" cfsqltype="CF_SQL_VARCHAR"
maxlength="255" />
)
cf_menace Guest



Reply With Quote

