Re: escaping character in sql statements

"Petr Vileta" <[email protected]> Thu, 25 Oct 2007 02:04:10 +0200
Newsgroups gmane.comp.db.mysql.windows
Message-ID <003c01c8169a$aff12410$6401a8c0@petr1>
Mark Mchugh wrote:
> Hi,
> I am writing an sql to retrieve data relating to certain files in a
> folder from my database. Some times part of the data may contain a '
> character.
>
> here's an example of the sql
>
> select * from files where location = 
> '\\\\\\\\192.168.0.100\\\\clients\\\\o''orielly\\\\file%'
>
>
This should be

select * from files where location = 
'\\\\\\\\192.168.0.100\\\\clients\\\\o\'orielly\\\\file%'

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)




-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]