Javascript JS SQLite选择不相等的和
我使用下面的代码来获取score_h和score_a列的总和,而不包括point_id='set'所在的行Javascript JS SQLite选择不相等的和,javascript,sqlite,Javascript,Sqlite,我使用下面的代码来获取score_h和score_a列的总和,而不包括point_id='set'所在的行 db.transaction(function(t) { t.executeSql('SELECT SUM(score_h) AS myscore_h, SUM(score_a) AS myscore_a FROM playerstats WHERE matchid = ? AND point_id <> ?', [globalmatchid, 'set']); });
db.transaction(function(t) {
t.executeSql('SELECT SUM(score_h) AS myscore_h, SUM(score_a) AS myscore_a FROM playerstats WHERE matchid = ? AND point_id <> ?', [globalmatchid, 'set']);
});
db.transaction(函数(t){
t、 executeSql('SELECT SUM(score_h)AS myscore_h,SUM(score_a)AS myscore_a,来自playerstats,其中matchid=?和point_id?',[globalmatchid,'set']);
});
但结果不排除不等于“set”的点id线
我哪里错了?你确定吗?直接运行查询,不带求和,并检查得到的行。如果它们被排除在外,它们也将被排除在聚合之外。请注意
null
值:WHERE matchid=?和(点id为空或点id?
)。