T201704051348
This commit is contained in:
@@ -47,7 +47,9 @@ if($uid == '') {
|
||||
$new_time = $old_time + $time;
|
||||
$db->query('UPDATE "Games" SET "total_time" = $1 WHERE "ID" = $2', array($new_time, $uid));
|
||||
|
||||
//set high score
|
||||
//set highscore
|
||||
$cid = $db->query('SELECT "current_category" FROM "Games" WHERE "ID" = $1', array($uid))
|
||||
['data'][0]['current_category'];
|
||||
if($db->query('SELECT EXISTS (SELECT 1 FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2)',
|
||||
array($uid, $cid))['data'][0]['exists'] == 'f') {
|
||||
$db->query('INSERT INTO "Highscores" ("Users_ID", "Categories_ID") VALUES ($1, $2)', array($uid, $cid));
|
||||
|
||||
Reference in New Issue
Block a user