\ has to be encoded as \\\\ in utf8 query in WHERE statement, \\ in UPDATE clause
Posted by: Sébastien Santoro
Date: January 22, 2007 07:01AM

On Windows Server 2003, MySQL 5, utf8_general_ci collation :

To update a field from D:\\MusicBase\\testrename.mp3 to D:\\Megalo\\testrename2.mp3 I've to use this very strange escape syntax :

UPDATE Files SET `file_path` = 'D:\\MusicBase\\testrename.mp3' WHERE `file_path` LIKE 'D:\\\\MusicBase\\\\testrename2.mp3'

Tested from C# code through MySQL.Data, mysql.exe CLI and phpMyAdmin.

Why this strange escapement behavior ?

Options: ReplyQuote


Subject
Views
Written By
Posted
\ has to be encoded as \\\\ in utf8 query in WHERE statement, \\ in UPDATE clause
2704
January 22, 2007 07:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.