删除user表中的type=2 and usercategoryid 不是1,2。3的全部数据 User::deleteAll([ ‘and‘, ‘type = :type_id‘, [‘not in‘, ‘usercategoryid‘, $categoriesList]],[ ‘:type_id‘ => 2 ]); //Output Query //DELETE FROM `tbl_user` WHERE (type = 2) AND (`usercategoryid` NOT IN (1, 2, 3))
时间: 2024-12-26 06:27:55