'UPDATE Gamestatus SET Red = 1+(SELECT Red FROM Gamestatus WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")) WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")',
(error)=>{
if(error){
console.log(error);
res.status(500).json({status:'false'});
}else{
res.status(200).json({status:'true'});
}
}
);
}elseif(team==='blue'){
db.query(
'UPDATE Gamestatus SET Blue = 1+(SELECT Blue FROM Gamestatus WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")) WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")',
'UPDATE Gamestatus SET Red = -1+(SELECT Red FROM Gamestatus WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")) WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")',
(error)=>{
if(error){
console.log(error);
res.status(500).json({status:'false'});
}else{
res.status(200).json({status:'true'});
}
}
);
}elseif(team==='blue'){
db.query(
'UPDATE Gamestatus SET Blue = -1+(SELECT Blue FROM Gamestatus WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")) WHERE SessionID = (SELECT SessionID FROM Session WHERE SessionName = \"'+spielname+'\")',