Re: Backslash NOT being stored

Sergei Golubchik <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
Hi!

On Apr 09, Paul McNeil wrote:
> Good day.  If I do the following...
> INSERT INTO myTable (data) VALUES('Here is a backslash \ ');
> 
> I escape it prior to sending so the value that gets sent to the DB is....
> INSERT INTO myTable (data) VALUES('Here is a backslash \\ ');
> 
> BUT when I check the DB the data field reads
> [Here is a backslash ]
> 
> It eats the single backslash.
> 
> How can I prevent this?

According to

http://dev.mysql.com/doc/mysql/en/String_syntax.html

backslash is an escape character and must be escaped.

Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[email protected]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/  www.mysql.com

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.