如何通过ASC随机和价格订单使用获取'food_store'订单? 现在写我正在使用此查询
Select * from `food` where `veg_non` = 'Veg' and `food_price` <= ? ORDER BY RAND()
答案 0 :(得分:2)
试试这个:
Select *, RAND() as r from `food` where `veg_non` = 'Veg'
and `food_price` <= ? ORDER BY `food_price` ASC, r ASC