It depends on what language you are using to send the query.
If you are using the shell, 'S\'ARENAL' parses to 'S'ARENAL' before it is sent to the server.
You will need to escape the escape character.
'S\\'Arenal'
or maybe even 'S\\\'Arenal' or 'S\\\\'ARENAL'
It depends on how many parsers scan the string before it gets sent on to the server.
If you are using perl or PHP use the quoting functions provided.


Diana Castillo wrote:

Hi, How can I make a query that looks for a city that has a " ' " in the name? For 
instance, I am looking for the name S'ARENAL, but the query below does not work:

SELECT intl_localidades.id, intl_localidades.codigo_pais, intl_localidades.localidad_es,intl_zonas.zona,intl_paises.pais_es FROM intl_localidades INNER JOIN intl_zonas ON (intl_localidades.codigo_zona = intl_zonas.id) INNER JOIN intl_paises ON (intl_zonas.codigo_pais = intl_paises.id) INNER JOIN intl_province_mapping ON (intl_localidades.id = intl_province_mapping.location_code) WHERE ((intl_province_mapping.provider_code = 25) and (intl_province_mapping.provider_city_code = 'S\'ARENAL'))

Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
     http://www.destinia.com







-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to