我需要使用where子句
查询一些数据根据API google map engine我的请求如下。
https://www.googleapis.com/mapsengine/v1/tables/14538994882799551513-11853667273131550346/features?where=gx_id%3D900
对于上述网址,它说BAD REQUEST 其中= gx_id = 900
,回复是
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "The value is invalid.",
"locationType": "parameter",
"location": "query"
}
],
"code": 400,
"message": "The value is invalid."
}
}
请告诉我这个网址有什么问题
答案 0 :(得分:2)
您在查询中使用数字,但特定gx_id
似乎是String类型。
用单引号括起数字:
https://www.googleapis.com/mapsengine/v1/tables/14538994882799551513-11853667273131550346/features?where=gx_id%3D%27900%27
答案 1 :(得分:0)
此外,您不必担心创建和跟踪您的ID。 API表示您只需要包含gx_id以确保没有两次发送任何功能。 因此,您可以输入一个表示系统当前时间的字符串。