bdd = new PDO(DSN_BDD1, USER_BDD1, PASS_BDD1);
break;
case 'bdd2':
$this->bdd = new PDO(DSN_BDD2, USER_BDD2, PASS_BDD2);
break;
default:
$this->bdd = new PDO(DSN_FICHES, USER_FICHES, PASS_FICHES);
}
}
public function faireUneRequete($sql)
{
$req = $this->bdd->query($sql, PDO::FETCH_ASSOC);
return $req;
}
public function creerTableau($res){
$tab = array();
foreach($res as $key => $row){
$tab[$key] = $row;
}
return $tab;
}
}