2016-04-29 11:35:36 7206次浏览 4条回答 1 悬赏 10 金钱

Yii2 打印 SQL 怎么写?不用 debug 调试,比如我打印一下这个 save 操作的 sql 应该怎么写?

public function actionDeletetable($id)
{
    $this->table = $this->table->findModel($id);
    $this->table->status = 3;
    if($this->table->save()){
        return $this->redirect('/table/index');
    }
}
您需要登录后才可以回答。登录 | 立即注册
小程府
经理

小程府 北京

注册时间:2016-03-23
最后登录:2021-02-09
在线时长:30小时31分
  • 粉丝13
  • 金钱255
  • 威望100
  • 积分1555

热门问题