Пример #1
0
 /**
  * Update data of a dish
  * @param Dish $dish 
  */
 public function update(Dish $dish)
 {
     $query = $this->_db->prepare('UPDATE dish SET name = :name, origin = :origin, time_to_cook = :time_to_cook WHERE dish_id = :dish_id');
     $query->execute(array('name' => $dish->getName(), 'origin' => $dish->getOrigin(), 'time_to_cook' => $dish->getTimeToCook(), 'dish_id' => $dish->getDishId()));
 }