版权声明:博客知识产权来源命运的信徒,切勿侵权 https://blog.csdn.net/qq_37591637/article/details/88367603
如果返回的是一个表里面的数据的话,可以采用如下方法
注意:name和passworda是我的表里面的属性值
// 查询数据
query.createQuery({
}, function(ret, err) {
//coding...
if (ret && ret.qid) {
model.findAll({
class : 'userinfo',
qid : ret.qid
}, function(ret, err) {
for (var i = 0; i < ret.length; i++) {
alert(ret[i].name+"</td><td>"+ret[i].password);
}
});
}
});
如果返回的是count值的话,查询数据的条数,用如下办法