jbiz
jbiz

Reputation: 424

How to escape single quote in Vtiger Webservice

Does anyone know how to escape a single quote (') when executing a query with the Vtiger webservice?

I've tried the following:

The error that I get is:

{u'error': {u'code': u'QUERY_SYNTAX_ERROR',
 u'message': u"Syntax Error on line 1: token 'Connor' Unexpected COLUMNNAME(Connor), expected one of: SEMICOLON",
 u'xdebug_message': u"\nWebServiceException: Syntax Error on line 1: token 'Connor' Unexpected COLUMNNAME(Connor), expected one of: SEMICOLON in /var/www/sites/vtigercrm6_test/include/Webservices/VTQL_Parser.php on line 1499\n\nCall Stack:\n    0.0001     221800   1. {main}() /var/www/sites/vtigercrm6_test/webservice.php:0\n    0.0163    3089752   2. OperationManager->runOperation() /var/www/sites/vtigercrm6_test/webservice.php:134\n"},
 u'success': False}

Vtiger Webservice Reference

Thanks!

Upvotes: 0

Views: 472

Answers (1)

jbiz
jbiz

Reputation: 424

I was able to figure it out - double single quotes!!

select * from Contacts where lastname = 'O''Connor';

Upvotes: 0

Related Questions