<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">String literal is not allowed to contain (') in webservice query.</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">--</div><div dir="ltr"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><a href="http://www.facebook.com/vtiger" style="color:rgb(0,0,204)" target="_blank">FB</a> I </span><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twit</a> I <a href="https://www.linkedin.com/company/1270573?trk=tyah" style="color:rgb(0,0,204)" target="_blank">LIn</a> I <a href="https://blogs.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Blog</a> I <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 9, 2019 at 10:06 PM Martin Allen <<a href="mailto:martin.allen@clystnet.com">martin.allen@clystnet.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi, Im trying to run a Webservice Query to look for a Contact by their email address. <br>The email address in question contains a ' character (single quote) which is a valid character for an email address to contain.<br><br>However I cannot structure a Query that will work with it </div><div class="gmail_default"><font face="verdana, sans-serif">I have tried </font><br>$query = 'SELECT * FROM Contacts WHERE email = "<a href="mailto:test.%27ing@example.com" target="_blank">test.'ing@example.com</a>";';<br><br>but this returns an INTERNAL_SERVER_ERROR<br><br>and<br><br>$query = "SELECT * FROM Contacts WHERE email = '<a href="mailto:test.%27ing@example.com" target="_blank">test.'ing@example.com</a>';";<br><br>but this returns<br>QUERY_SYNTAX_ERROR" ["message"]=> string(94) "Syntax Error on line 1: token 'ing' Unexpected COLUMNNAME(ing), expected one of: SEMICOLON" - which you would expect.<br><br>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??</div><div class="gmail_default"><br><span style="color:navy;font-family:Verdana,sans-serif;font-size:10pt">Martin Allen</span></div><div><div dir="ltr" class="gmail-m_-6280281081737468096gmail_signature"><div dir="ltr"><div dir="ltr"><p style="font-size:12.8px;color:rgb(80,0,80)"><b style="color:rgb(34,34,34);font-size:12.8px"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><a href="https://emailrtc.voiceflex.com/?c=7b355216c4" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(31,73,125)">>>Call me now for free<<</span></a></span></b><span style="color:navy;font-family:Verdana,sans-serif;font-size:10pt"><br></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b style="font-size:12.8px"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(51,51,153)">01392 248692 - Main Office<br>01392 690659 - Direct Line</span></b><br></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(51,51,153)"><img width="288" height="65" alt="signature2"></span></b><span style="color:rgb(31,73,125)"></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:navy">Have you visited our website recently? <a href="http://www.clystnet.com/" style="color:rgb(17,85,204)" target="_blank">http://www.clystnet.com</a></span><span style="color:rgb(31,73,125)"></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:navy"><br></span><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(153,153,153)">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</span></p></div></div></div></div></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>