Example #1
0
 /**
  * Save changes to database, it's an good idea to use save() instead
  *
  * @return void
  */
 public function update()
 {
     try {
         $data["id"] = $this->model->getId();
         $data["targetId"] = $this->model->gettargetId();
         $data["date"] = $this->model->getDate();
         $data["type"] = $this->model->getType();
         $data["classname"] = $this->model->getClassname();
         $data["rating"] = $this->model->getRating();
         $data["metadata"] = $this->model->getMetadata();
         $data["comment"] = $this->model->getComment();
         $this->db->update("plugin_ratingscomments_ratings", $data, "id='" . $this->model->getId() . "'");
     } catch (Exception $e) {
         throw $e;
     }
 }