public function genBatimentLink() { global $bdd; foreach (Batiment::Batiments() as $row) { $req = "INSERT INTO POSSEDE_BATIMENT(idJoueur, idBatiment) VALUES ('" . $this->idJoueur . "', '" . $row['idBatiment'] . "')"; $req = $bdd->exec($req); } }
<?php include_once './modele/ressource.php'; include_once './modele/Batiment.php'; $titre = "Mes batiments"; $res = Ressource::Ressources(); $bat = Batiment::Batiments(); include_once './vue/Batiment.php';