Even bigger would be saying "Cold Fusion" not once... but twice.

Definitely look into cfqeryparam if you aren't using it. If you accept info
from end users to put into your database and don't use cfqeryparam... you
are just asking for trouble. There are also other benefits. One would be...
not having to replace any kind of quotes. :-)

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-----Original Message-----
From: Adam Haskell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 11:28 AM
To: CF-Talk
Subject: Re: Replacing Strings

Bigger rookie mistake is not using cfqueryparam.

Adam Haskell
http://cfrant.blogspot.com

On 11/1/07, Rick Sanders <[EMAIL PROTECTED]> wrote:
>
> Hi Andy,
>
> Thanks for your response. I can't believe I made the rookie mistake of not
> using single quotes instead of double quotes in the expression!
>
> Kind regards,
>
> Rick Sanders
> Canada: 902-401-7689
> USA:       919-799-9076
> Canada: www.webenergy.ca
> USA:       www.webenergyusa.com
>
> -----Original Message-----
> From: Andy Matthews [mailto:[EMAIL PROTECTED]
> Sent: November-01-07 10:46 AM
> To: CF-Talk
> Subject: RE: Replacing Strings
>
> use single quotes in your replace function (and you don't need REReplace
> just FYI).
>
> REReplace('dill"s','"',"'","ALL")
>
> -----Original Message-----
> From: Rick Sanders [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 01, 2007 7:47 AM
> To: CF-Talk
> Subject: Replacing Strings
>
> Hey list,
>
>
>
> I'm trying to replace a double quote in a text field to a single quote.
> I've
> tried using ReReplace, but it still crashes the Cold Fusion server.
>
> What I've done is this:
>
> <cfoutput>#REReplace("dill"s",""","'","ALL")#</cfoutput>
>
>
>
> See, users tend to like using double quotes in a text field which breaks
> the
> SQL query. How can i check if there's a double quote in a #form.textfield#
> and remove it?
>
>
>
> Thanks in advance.
>
>
>
> Rick Sanders
>
> Webenergy
>
> Canada: 902-401-7689
>
> USA:       919-799-9076
>
> Canada: www.webenergy.ca
>
> USA:       www.webenergyusa.com
>
>
>
>
>
>
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

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

Reply via email to