Grouping records from while loop | PHP

前端 未结 2 1193
旧时难觅i
旧时难觅i 2021-01-21 07:20

I\'m trying to group down records by their priority levels, e.g.

--- Priority: High ---

Records...

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-21 07:27

    If you use mysql why would not you use DB ordering capabilities?

    SELECT *
    FROM items
    ORDER BY priority DESC
    

提交回复
热议问题