thinkphp5.1如何實作replace into
王珂
王珂 2020-02-23 11:44:25
0
0
1134

if(Comments::create($data)){
   $this->success('評論發佈成功','index/index');
} else {
   $this- >error('評論保存失敗','index/index');
}

我在表中建立了唯一索引,想讓評論人只能發表一次評論,再次發送時對先前的評論更新插入。上面的程式碼,只能實作insert into 。請大神幫忙實現replace into。

王珂
王珂

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!