2 messages in com.mysql.lists.mysqlSingle Quotes in a Select Statement
FromSent OnAttachments
Cal Evans17 Aug 2001 16:21 
Philip Mak17 Aug 2001 17:53 
Subject:Single Quotes in a Select Statement
From:Cal Evans (ca@calevans.com)
Date:08/17/2001 04:21:50 PM
List:com.mysql.lists.mysql

Greetings MySQLers!

This messages is about MySQL. (had to put that in for the spam filter)

I have a record in my database:

productID Title 4 This title has a ' in it.

In the database, this is actually stored as: productID Title 4 This title has a \' in it.

I have a query:

Select * from product where title = 'This title has a \' in it.';

This query does not work. Can anyone tell me how to build a query that will return that title?

Things I have tried: Select * from product where title = 'This title has a ' in it.'; Select * from product where title = 'This title has a \' in it.'; Select * from product where title = 'This title has a ''' in it.'; Select * from product where title = 'This title has a '' in it.';

TIA for any help, Cal http://www.calevans.com