public function update(Appartement $appartement) { $query = $this->_db->prepare(' UPDATE t_appartement SET numeroTitre=:numeroTitre,nom=:nom,superficie=:superficie,surplan=:surplan,prix=:prix, niveau=:niveau,facade=:facade,nombrePiece=:nombrePiece,cave=:cave WHERE id=:id') or die(print_r($this->_db->errorInfo())); $query->bindValue(':id', $appartement->id()); $query->bindValue(':numeroTitre', $appartement->numeroTitre()); $query->bindValue(':nom', $appartement->nom()); $query->bindValue(':superficie', $appartement->superficie()); $query->bindValue(':surplan', $appartement->surplan()); $query->bindValue(':prix', $appartement->prix()); $query->bindValue(':niveau', $appartement->niveau()); $query->bindValue(':facade', $appartement->facade()); $query->bindValue(':nombrePiece', $appartement->nombrePiece()); $query->bindValue(':cave', $appartement->cave()); $query->execute(); $query->closeCursor(); }
public function update(Appartement $appartement) { $query = $this->_db->prepare(' UPDATE t_appartement SET nom=:nom, superficie=:superficie, prix=:prix, niveau=:niveau, facade=:facade, nombrePiece=:nombrePiece, status=:status, cave=:cave, par=:par, updated=:updated, updatedBy=:updatedBy WHERE id=:idAppartement') or die(print_r($this->_db->errorInfo())); $query->bindValue(':idAppartement', $appartement->id()); $query->bindValue(':nom', $appartement->nom()); $query->bindValue(':superficie', $appartement->superficie()); $query->bindValue(':facade', $appartement->facade()); $query->bindValue(':prix', $appartement->prix()); $query->bindValue(':niveau', $appartement->niveau()); $query->bindValue(':nombrePiece', $appartement->nombrePiece()); $query->bindValue(':cave', $appartement->cave()); $query->bindValue(':status', $appartement->status()); $query->bindValue(':par', $appartement->par()); $query->bindValue(':updated', $appartement->updated()); $query->bindValue(':updatedBy', $appartement->updatedBy()); $query->execute(); $query->closeCursor(); }