public function insert($title, $content) { $cmd = 'INSERT INTO notify(notify_title, notify_content, notify_created) VALUES (:title, :content, :time)'; $param = array('title' => Util::simple_purify($title), 'content' => LibUtil::html_purify($content), 'time' => Util::get_datetime()); $this->run($cmd, $param); }
public function update($id, $title, $content) { $cmd = 'UPDATE news set news_title=:title, news_content=:content, news_created=:time WHERE news_id=:id'; $param = array('id' => $id, 'title' => Util::simple_purify($title), 'content' => LibUtil::html_purify($content), 'time' => Util::get_datetime()); $this->run($cmd, $param); }