Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

escape \ character not working

Status
Not open for further replies.

jez

Programmer
Apr 24, 2001
370
VN
Hi everyone,

I hope someone can help me here, I have what seems to be an odd problem, but i expect it is a setting somewhere.

I have looked through the documentation but cannot see anything.

I have dumped a databased to a SQL file with MySql administrator.
I am using mysql 5.0.51 on linux.

I am trying to import this file to my web database which is 5.0.22


The place it falls over is in a string in an insert statement.
The string is quoted in single quotes and has an escaped quote. as copied below.
Code:
INSERT INTO `symfony_project`.`accomodation` VALUES  (1,'My House','I\'ll tidy up and everything.',100,'SL8 8HG'),
 (2,'Faulty Towers','Comedy hotel',300,'NW3 4GG'),
 (3,'The Hilton','er... paris',500,'SE1 3TR');

The 'i\'ll bit of the insert is not being picked up as an escape character, i checked that when i imported i was using the same character set : latin1.

Any ideas?

Thanks.
 
Does it work if you change it to 'I''ll tidy up and everything.'?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top