on peut voir les cartes d'une partie
This commit is contained in:
26
controleurs/jouerPartie_controleur.php
Normal file
26
controleurs/jouerPartie_controleur.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
function getCardsName(int $idpartie)
|
||||
{
|
||||
$cartes = get_infos_requete("SELECT img FROM carte JOIN est_compose USING(idcarte) JOIN partie USING(idplateau) WHERE idpartie = " . $idpartie . " ORDER BY rang")['instances'];
|
||||
|
||||
$noms = array();
|
||||
foreach ($cartes as $carte) {
|
||||
array_push($noms, $carte['img']);
|
||||
}
|
||||
|
||||
return $noms;
|
||||
}
|
||||
|
||||
function get_parties_id() {
|
||||
$parties = get_infos_requete("SELECT idpartie FROM partie")['instances'];
|
||||
|
||||
$ids = array();
|
||||
foreach ($parties as $partie) {
|
||||
array_push($ids, $partie['idpartie']);
|
||||
}
|
||||
|
||||
return $ids;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user