On Fri, 1 Oct 2004 16:18:09 -0400, Adkins, Randy <[EMAIL PROTECTED]> wrote:
> I guess this is more MySQL related but I am using CF to
> add data to the MySQL database.
>
> I have the field set as a varchar field and I am trying
> to add file paths to the field such as
>
> update this table
> set file_path = 'c:\mypath\thisfolder\thisdirectory'
>
> however when it is added to the field all of the
> slashes "\" are no longer part of the data.
>
> I am not stripping them.
>
> This is on a windows platform using MySQL 4
>
> Thanks for your help!

In MySQL a backslash character is considered an escape character and
is stripped out. Therefore, in order for the backslashes to appear in
the string you need to make read as follows:

set file_path = 'c:\\mypath\\thisfolder\\thisdirectory'

Notice the double backslashes. MySQL will strip the first one out
leaving the second in place.

--
chris johnston

www.fuzzylizard.com

"For millions of years, mankind lived just like the animals and
something happened which unleashed the power of our imagination, we
learned to talk."
Pink Floyd
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to