FeedbackModel::update PHP Méthode

update() public méthode

更新反馈信息
Author: Medz Seven ([email protected])
public update ( $fid, $content ) : boolean
Résultat boolean
    public function update($fid, $content)
    {
        /* # ID 转为int */
        $fid = intval($fid);
        /* # 检查是否存在 */
        if (!$this->where('`id` = ' . $fid)->field('`id`')->count()) {
            $this->_error = '更新的反馈信息不存在';
            return false;
        }
        /* # 更新数据 */
        return $this->where('`id` = ' . $fid)->save(array('mTime' => time(), 'content' => $content));
    }