How can I query Google Spreadsheets API with a string value?
- by ColinM
I am using Zend_Gdata_SpreadsheetsListQuery. In PHP my query is:
"confirmation=$confirmation"
The problem is that $confirmation = 'AB-CD-EFG-012345'; Apparently the hyphens are causing problems with the query and the exception thrown is:
Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400
Parse error: Invalid token encountered'
How can I quote or escape the value to not cause parse errors? Single quotes cause the same error, double quotes don't throw errors but there are no results to match.