if(Comments::create($data)){
$this->success('评论发布成功','index/index');
} else {
$this->error('评论保存失败','index/index');
}
我在表中建立了唯一索引,想让评论人只能发表一次评论,再次发送时对以前的评论更新插入。上面的代码,只能实现insert into 。请大神帮忙实现replace into。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号