/** * updateOne * * @param array $data * @return integer */ public function updateOne($id, $data) { $id = (int) $id[0]; \Application\MusicianType\Table::getInstance()->updateTypes($data['types'], $id); if (Session::get('image') != '') { $data['image'] = Session::get('image'); } $result = parent::updateOne($id, $data); return $result; }
/** * @param mixed $primary * @param array $data * @return int * @throws Exception * @throws \Bluz\Application\Exception\NotFoundException */ public function updateOne($primary, $data) { try { Db::handler()->beginTransaction(); $this->saveAdditionData($data); $response = parent::updateOne($primary, $data); //Db::delete('wertwert')->where(['ee' => 3333])->execute(); Db::handler()->commit(); return $response; } catch (\PDOException $e) { Db::handler()->rollBack(); throw $e; } }