我正在尝试从这样的RestoFoods
模型中删除数据:
RestoFoods::deleteAll(["restaurant_id"=>$postData['resto_id'], 'food_id NOT IN'=> [1,2] ]);
我想要这个sql:
DELETE FROM `resto_foods` WHERE `restaurant_id`=1 AND (`food_id` NOT IN (1, 2));
我正在尝试从这样的RestoFoods
模型中删除数据:
RestoFoods::deleteAll(["restaurant_id"=>$postData['resto_id'], 'food_id NOT IN'=> [1,2] ]);
我想要这个sql:
DELETE FROM `resto_foods` WHERE `restaurant_id`=1 AND (`food_id` NOT IN (1, 2));