[Vtigercrm-developers] Webservice Query for email address with ' (single quote) character

Joe Bordes joe at tsolucio.com
Tue Apr 23 15:32:17 GMT 2019


This is not true, the solution is to put two contiguous single quotes.


On 23/4/19 17:28, Prasad wrote:
> String literal is not allowed to contain (') in webservice query.
> --
> FB <http://www.facebook.com/vtiger> I Twit 
> <http://twitter.com/vtigercrm> I LIn 
> <https://www.linkedin.com/company/1270573?trk=tyah> I Blog 
> <https://blogs.vtiger.com> I Website <https://www.vtiger.com/>
>
>
> On Tue, Apr 9, 2019 at 10:06 PM Martin Allen 
> <martin.allen at clystnet.com <mailto:martin.allen at clystnet.com>> wrote:
>
>     Hi, Im trying to run a Webservice Query to look for a Contact by
>     their email address.
>     The email address in question contains a ' character (single
>     quote) which is a valid character for an email address to contain.
>
>     However I cannot structure a Query that will work with it
>     I have tried
>     $query = 'SELECT * FROM Contacts WHERE email =
>     "test.'ing at example.com <mailto:test.%27ing at example.com>";';
>
>     but this returns an INTERNAL_SERVER_ERROR
>
>     and
>
>     $query = "SELECT * FROM Contacts WHERE email =
>     'test.'ing at example.com <mailto:test.%27ing at example.com>';";
>
>     but this returns
>     QUERY_SYNTAX_ERROR" ["message"]=> string(94) "Syntax Error on line
>     1: token 'ing' Unexpected COLUMNNAME(ing), expected one of:
>     SEMICOLON" - which you would expect.
>
>     I have tried escaping with " \' " but this returns the same
>     QUERY_SYNTAX_ERROR - has anyone else got a way of structuring the
>     query, or escaping the ' character that works??
>
>     Martin Allen
>
>     *>>Call me now for free<<
>     <https://emailrtc.voiceflex.com/?c=7b355216c4>*
>
>     *01392 248692 - Main Office
>     01392 690659 - Direct Line*
>
>     *signature2*
>
>     Have you visited our website recently? http://www.clystnet.com
>     <http://www.clystnet.com/>
>
>
>     The information in this email is confidential If you are not the
>     intended recipient, you must not read or use that information.
>     This email and any attachments are believed to be virus free
>     however no responsibility is accepted by Clystnet for any loss or
>     damage arising in any way from receipt or use thereof. Clystnet
>     Ltd (company reg number 7164503) is based at Silverdown Park, Fair
>     Oak Close, Clyst Honiton, EX5 2UX
>
>     _______________________________________________
>     http://www.vtiger.com/
>
>
> _______________________________________________
> http://www.vtiger.com/

-- 
Un saludo
Joe
TSolucio

JPL TSolució, S.L. garantiza la confidencialidad de los datos que obran en su poder y según lo estipulado por la LOPD
(Ley Orgánica 15/1999 de 13 de diciembre de Protección de Datos de Carácter Personal). Este mensaje se dirige
exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario
indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización está prohibida en
virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente
por esta misma vía y proceda a su destrucción. El correo electrónico vía Internet no permite asegurar la confidencialidad
de los mensajes que se transmiten ni su integridad o correcta recepción. JPL TSolució, S.L. no asume ninguna
responsabilidad por estas circunstancias.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190423/082310a7/attachment.html>


More information about the vtigercrm-developers mailing list