Browse Source

bugfix

bugfixes
Michaël Boeyens 3 years ago
parent
commit
9dd1580259
2 changed files with 2 additions and 2 deletions
  1. BIN
      db.sqlite
  2. 2
    2
      dbase.inc

BIN
db.sqlite View File


+ 2
- 2
dbase.inc View File

@@ -58,7 +58,7 @@ class dbase
public function userScoreQuery($spelerId)
{
$stmtUserScore = $this->db->prepare("SELECT date, won, difficulty FROM game WHERE user_id = :usrid ORDER BY date");
$stmtUserScore->bindValue('usrid', $spelerId, SQLITE3_INTEGER);
$stmtUserScore->bindValue(':usrid', $spelerId, SQLITE3_INTEGER);
return $stmtUserScore->execute();
}

@@ -68,7 +68,7 @@ class dbase
$resultStmt = $this->db->prepare("INSERT INTO game (user_id, date, won, difficulty) VALUES (:splrId, :date, :splrscr, '{$_SESSION['game']->difficulty}')");
$resultStmt->bindValue(':splrId', $_SESSION['spelerId'], SQLITE3_INTEGER);
$resultStmt->bindValue(':date', date('Y-m-d H:i:s'), SQLITE3_TEXT);
$resultStmt->bindValue('splrscr', $_SESSION['game']->gameResult, SQLITE3_INTEGER);
$resultStmt->bindValue(':splrscr', $_SESSION['game']->gameResult, SQLITE3_INTEGER);
$resultStmt->execute();
}
}

Loading…
Cancel
Save