console.log('The scheduleJob run on first day of every month!',moment().format('YYYY-MM-DD'));
console.log('The scheduleJob run on first day of every month!',moment().format('YYYY-MM-DD HH:mm'));
pool.connect(function(err,client,done){
if(err){
...
...
@@ -172,7 +172,7 @@ router.post('/score', function (req, res) {
paramB['athletic_draw']=1
}
varqueryFirsrWinSql=`select count(*) from battle_history where (usernameA = '${winner}' OR usernameB = '${winner}') and start_time > date '${today}' `
varqueryFirsrWinSql=`select count(*) from battle_history where ( (usernameA = '${winner}' AND userscorea > userscoreb ) OR (usernameB = '${winner}' AND userscoreb > userscorea) ) and start_time > date '${today}' `