0
我正在尝试使用azure移动服务脚本过滤一些结果,但我在日志中收到此错误。我传递给此函数的参数也显示出来。使用azure移动服务脚本时出现javascript错误
错误 脚本'/table/Restaurant.read.js'中的错误。错误:传递给'查询'的回调选项无效。回调选项必须是至少具有'function'类型的'success'或'error'属性或'Array'类型的systemProperties属性的对象。 (:7:11)在读出 [外部代码] 在:1:6 [外部代码]
这是我的代码
function read(query, user, request) {
var location=request.parameters.Location;
var category=request.parameters.Category;
console.log("location is"+location);
console.log("category is"+category);
var sql="SELECT * from restaurant where Location=? AND Category=?";
mssql.query(sql,[location],[category],{success:function(results){request.respond(statusCodes.Ok,results);}});
}