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

Prasad prasad at vtiger.com
Tue Apr 23 15:28:01 GMT 2019


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>
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";';
>
> but this returns an INTERNAL_SERVER_ERROR
>
> and
>
> $query = "SELECT * FROM Contacts WHERE email = 'test.'ing 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 Office01392 690659 - Direct Line*
>
> *[image: signature2]*
>
> Have you visited our website recently? 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190423/57deac6a/attachment.html>


More information about the vtigercrm-developers mailing list