我有一个 mysql 表,其中包含一些列,dish_id、dish_description、dish_price、dish_category 等,
我有一个查询“order by categoria_piatto asc”,但这个查询对我来说不好,
我会自定义查询顺序,所以当获取数组运行时显示第一个结果dish_category = starters第二个结果dish_category =第一道菜第三个结果dish_category =主菜等...
我能怎么做?与 group by 子句或其他?
$portate = mysqli_query($con,"
SELECT *
FROM tablo_piatti
where id_ristorante = '$idrist'
and categoria_piatto = '$cat_piatto'
and disponibilita = 'Si'
order
by categoria_piatto asc
");
while($riga = mysqli_fetch_array($portate))
一只甜甜圈