Skip to content
Snippets Groups Projects
Commit 026b84cc authored by clement's avatar clement
Browse files

try

parent 844b593f
No related branches found
No related tags found
No related merge requests found
......@@ -129,8 +129,8 @@ class Objet
$dbName = self::dbName();
$bdd = new Db();
$requete_prepare = $bdd->db->prepare("SELECT * FROM ".$dbName." WHERE ".$this->_primaryAttr." = :id"); // on prépare notre requête
$requete_prepare->execute(array("id" => $id));
$requete_prepare = $bdd->db->prepare("SELECT * FROM ".$dbName." WHERE ".$this->_primaryAttr." = :".$this->getAll()[0]); // on prépare notre requête
$requete_prepare->execute(array("{$this->getAll()[0]}" => $id));
$ligne = $requete_prepare->fetch(PDO::FETCH_ASSOC);
$this->fromDb($ligne);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment