从Google获取当前地址,我想通过 T Extension,Nanhey Park,Om Vihar,Uttam Nagar,德里,110059,印度从数据库中搜索数据,但出现错误
SELECT *
FROM `thyrocare_location`
WHERE `location` IN (T Extension, Nanhey Park, Om Vihar, Uttam Nagar, Delhi, 110059, India)
答案 0 :(得分:0)
对于IN子句中的字符串值,您需要在每个值前后加上引号
SELECT *
FROM `thyrocare_location`
WHERE `location` IN ('T Extension', 'Nanhey Park',
'Om Vihar', 'Uttam Nagar', 'Delhi', '110059', 'India')
或者如果您的IN子句的内容只是一个字符串,那么您可以使用这种方式
SELECT *
FROM `thyrocare_location`
WHERE `location` = ('T Extension, Nanhey Park,
Om Vihar, Uttam Nagar, Delhi, 110059, India')