getFeaturesBySQLParameters = new SuperMap.REST.GetFeaturesBySQLParameters({
returnContent: true,
datasetNames: [dataSourceName + ":" + datasetName],
fromIndex: 0,
toIndex: -1,
queryParameter: new SuperMap.REST.FilterParameter({
attributeFilter: "RESGUID='" + currentTreeNode.id + "' or BELONG='" + currentTreeNode.id + "'";
}),
});
getFeaturesBySQLService = new SuperMap.REST.GetFeaturesBySQLService(queryUrl, {
eventListeners: {
"processCompleted": successCb,
"processFailed": errorCb
},isInTheSameDomain:true,method:"POST"
});
getFeaturesBySQLService.processAsync(getFeaturesBySQLParameters);
使用sql 查询,其中GetFeaturesBySQLParameters中设置了查询条件,
attributeFilter: "RESGUID='" + currentTreeNode.id + "' or BELONG='" + currentTreeNode.id + "'";
而currentTreeNode.id 的值为514b28b301a345c8bc01785fb17e5d33,字符串类型。
查询结果是查询不出值,而该语句直接执行sql是可以查询出值的,
若单独执行BELONG='" + currentTreeNode.id + "'"一个条件也是可以查询出结果的。
请问为何多条件查询无法查询出结果,是“OR”的原因吗?
浏览器后台出现错误:
Failed to load resource: net::ERR_EMPTY_RESPONSE
http://112.53.80.136:38099/iserver/services/data-cmdiZYS/rest/data/featureResults.json?returnContent=true