1

I have the following sql select statement which my variable $name does contain apostrophe (eg. ABC's), thus there will be an error.

Can someone kindly advise how can i change the sql statement to be able to retrieve information even though the $name contain apostrophe? I would only want to change directly in the sql statement. Thanks.

select * from tableA where name='$name';

John Conde
  • 212,985
  • 98
  • 444
  • 485

0 Answers0