Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/402.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript JS SQLite选择不相等的和_Javascript_Sqlite - Fatal编程技术网

Javascript JS SQLite选择不相等的和

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']); });

我使用下面的代码来获取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(函数(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?
)。