public function actionTest(){
        //删除

        //方法一
        $result = Test::find()->where(['id' => 1])->all();
        $result[0]->delete();

        //方法二
        Test::deleteAll('id>:id', array(':id' => 5));
    }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-09-28
  • 2022-12-23
  • 2021-11-29
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-11-24
  • 2021-11-24
  • 2022-02-17
相关资源
相似解决方案