Encapsulate the value in a cfqueryparam tag, which you should always
be doing anyway.

On Fri, May 16, 2008 at 3:58 AM, Jim McAtee <[EMAIL PROTECTED]> wrote:
> I ran into a problem inserting records into a MySQL 5.0 database when
> there's a backslash as the final character of a string value.  I never
> noticed this until I began working with some randomly generated character
> strings.
>
> INSERT INTO users (
>  name,
>  email,
>  username,
>  salt,
>  password
>  )
> VALUES (
>   'Cindy Smith',
>  '[EMAIL PROTECTED]',
>  'cindysmith',
>  'd}\',
>  'c9a96937d248c0f192ff217a72935cdd'
>  )
>
> The workaround is to either enapsulate the value in a <cfqueryparam> tag
> or to escape the backslashes with \\.  But I also realize that there are
> any number of places where this could crop up in existing code.  Is this a
> bug in CF8's handling of these strings for MySQL?  I would have thought it
> would escape them transparently.
>
> Is there a better workaround?

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305387
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to