|
|
@ -142,13 +142,16 @@ class PartieGateway
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$partie = $this->findLastPartie();
|
|
|
|
$partie = $this->findLastPartie();
|
|
|
|
$query = "INSERT INTO Contenir VALUES (:partie,:idEnigme,1)";
|
|
|
|
$query = "INSERT INTO Contenir VALUES (:partie,:idEnigme,:index)";
|
|
|
|
|
|
|
|
$i = 1;
|
|
|
|
foreach ($lesEnigmes as $enigme) {
|
|
|
|
foreach ($lesEnigmes as $enigme) {
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
"partie" => array($partie->getIdPartie(), SQLITE3_INTEGER),
|
|
|
|
"partie" => array($partie->getIdPartie(), SQLITE3_INTEGER),
|
|
|
|
"idEnigme" => array($enigme->getIdEnigme(), SQLITE3_INTEGER)
|
|
|
|
"idEnigme" => array($enigme->getIdEnigme(), SQLITE3_INTEGER),
|
|
|
|
|
|
|
|
"index" => array($i, SQLITE3_INTEGER),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)";
|
|
|
|
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)";
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|