Jump to content


Photo

how to handle a select with an apostraphe 's


  • Please log in to reply
1 reply to this topic

#1 cgchris99

cgchris99
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 31 December 2003 - 11:20 PM

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

#2 triphis

triphis
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts

Posted 01 January 2004 - 07:47 AM

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 %
Xac Attack




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users