How to sort by previous date in database?

后端 未结 4 993
孤街浪徒
孤街浪徒 2021-01-16 07:46

What I want to ask is how to select from database record and my php code able to sort previous date by date,which is what i want to display in my interface:



        
4条回答
  •  抹茶落季
    2021-01-16 08:08

    I think what you want can be achieved by sorting the results in the db and removing duplicates by grouping

    SELECT date FROM staff WHERE date < '$Current' ORDER BY date ASC GROUP BY date;
    

提交回复
热议问题