NYCPHP Meetup

NYPHP.org

[nycphp-talk] Escaping special character like *, + in sql where clause

Hans Zaunere hans at nyphp.com
Fri Oct 8 18:14:01 EDT 2004


Depending on the SQL server you're using, an asterisk '*' isn't
generally a special character in SQL.  That said, you can always escape
characters with a blackslash, '\'

 

H

 

 

 

________________________________

From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Sumithra S.Nair
Sent: Friday, October 08, 2004 4:24 PM
To: talk at lists.nyphp.org
Subject: [nycphp-talk] Escaping special character like *,+ in sql where
clause

 

Hi,

 

   How can I escape these characters in the sql where clause. 

 

Select * from table1 where name like 'John smith*'.

 

The * is part of the name itself.

 

Thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20041008/d04b702f/attachment.html>


More information about the talk mailing list