|
|
@@ -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(); |
|
|
|
} |
|
|
|
} |