public function ModifierOccurrence($_id, array $_table)
{
$statement=$this->connexion->prepare("UPDATE". $this->table. "set resto_name=:nom, resto_rue=:rue,
resto_cp=:cp, resto_ville=:ville, resto_prix_moyen=:prix, resto_comment=:commentaire, resto_score=:note,
resto_visite=:visite WHERE id =". $_id );
$statement->bindParam(":nom",$_table[1], PDO:: PARAM_STR);
$statement->bindParam(":rue",$_table[2], PDO:: PARAM_STR);
$statement->bindParam(":cp",$_table[3], PDO:: PARAM_INT);
$statement->bindParam(":ville",$_table[4], PDO:: PARAM_STR);
$statement->bindParam(":prix",$_table[5], PDO:: PARAM_STR);
$statement->bindParam(":commentaire",$_table[6], PDO:: PARAM_STR);
$statement->bindParam(":note",$_table[7], PDO:: PARAM_INT);
$statement->bindParam(":visite",$_table[8], PDO:: PARAM_STR);
$statement->execute();
$nbligne=$statement->rowCount();
if ($nbligne==1){
return"Modifications prise en compte";
}
else
{
return "Erreur! modification non prise en compte";
}
for ($i=0; $i < $this->statement->rowCount(); $i++) {
}
}
public function afficherligne($_id)
{
$requete="SELECT * FROM ".$this->table." WHERE resto_code=:id";
$state=$this->connexion->prepare($requete);
$state->bindParam(":id",$_id,PDO::PARAM_INT);
$state->execute();
return $state->fetch();
}