Example #1
0
 public function updatePost()
 {
     $database = new Database();
     $id = (int) $this->id;
     $title = $database->sanitizeInput($this->title);
     $content = $database->sanitizeInput($this->content);
     $dml = sprintf("update post set title = '%s', content = '%s' where id = %d", $title, $content, $id);
     return $database->executeDml($dml);
 }