Skip to content
Snippets Groups Projects
Commit 2c198917 authored by clement's avatar clement
Browse files

try

parent 026b84cc
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
class Espece extends Objet
{
protected $_primaryAttr = "nom";
protected $nom;
protected $prix_consultation;
......
......@@ -129,8 +129,8 @@ class Objet
$dbName = self::dbName();
$bdd = new Db();
$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));
$requete_prepare = $bdd->db->prepare("SELECT * FROM ".$dbName." WHERE ".$this->_primaryAttr." = :id"); // on prépare notre requête
$requete_prepare->execute(array("id" => $id));
$ligne = $requete_prepare->fetch(PDO::FETCH_ASSOC);
$this->fromDb($ligne);
......
......@@ -2,6 +2,7 @@
class Race extends Objet
{
protected $_primaryAttr = "nom";
protected $nom;
protected $espece;
protected $prix_intervention;
......
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