Jump to content

Archived

This topic is now archived and is closed to further replies.

cgchris99

how to handle a select with an apostraphe 's

Recommended Posts

I have a select based on club name.

 

It works for the first 10 records but when I select the next 10 it has a \'s in it.

 

Select * from mytable where clubname like \'xyz sportsmen\'s club\'

 

What is the right way to do this?

 

The website is PHP driven

Share this post


Link to post
Share on other sites

it would be best not to have any apostrophies at all actually, butyou could do an IF statement, and if there is an \' in the title, replace it with %

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.