How to fetch previous date data in php mysql

前端 未结 2 899
执笔经年
执笔经年 2021-01-21 23:17

\"enter

I am working on stock project in PHP.Currently while searching according date it i

2条回答
  •  囚心锁ツ
    2021-01-21 23:38

    Just tweak your SELECT query:

    SELECT * FROM details WHERE date <= 'your-date-here' ORDER BY date DESC LIMIT 1
    

提交回复
热议问题