如何在 Fusion Tables 中编写 Where 查询
How can I Write Where Query in Fusion Tables
我想select所有坐标(latlong),其中user_id(一个数字)= 1来自融合table..
我尝试使用
var tableid = "1WjowbI77j1WFcn3IEtbwBymhVZh8jfmP_dg1epd9";
var key = "AIzaSyCALoSz00ZY3zTL1D_xUTD9GMb3T1ocBdU";
var query = "SELECT * FROM "+tableid+"&key="+key+" WHERE user_id=1";
var url = "https://www.googleapis.com/fusiontables/v2/query?sql="+query
没用..
错误:
GET googleapis.com/fusiontables/v2/query?sql=SELECT%20*%20FROM%201W…mP_dg1epd9&key=AIzaSyCALoSz00ZY3zTL1D_xUTD9GMb3T1ocBdU%20WHERE%20user_id=1 400 (Bad Request)
您的查询不正确:
var query = "SELECT * FROM "+tableid+"&key="+key+" WHERE user_id=1";
应该是
var query = "SELECT * FROM "+tableid+" WHERE user_id=1&key="+key;
我想select所有坐标(latlong),其中user_id(一个数字)= 1来自融合table.. 我尝试使用
var tableid = "1WjowbI77j1WFcn3IEtbwBymhVZh8jfmP_dg1epd9";
var key = "AIzaSyCALoSz00ZY3zTL1D_xUTD9GMb3T1ocBdU";
var query = "SELECT * FROM "+tableid+"&key="+key+" WHERE user_id=1";
var url = "https://www.googleapis.com/fusiontables/v2/query?sql="+query
没用.. 错误:
GET googleapis.com/fusiontables/v2/query?sql=SELECT%20*%20FROM%201W…mP_dg1epd9&key=AIzaSyCALoSz00ZY3zTL1D_xUTD9GMb3T1ocBdU%20WHERE%20user_id=1 400 (Bad Request)
您的查询不正确:
var query = "SELECT * FROM "+tableid+"&key="+key+" WHERE user_id=1";
应该是
var query = "SELECT * FROM "+tableid+" WHERE user_id=1&key="+key;