$timetoday = strtotime(date("Y-m-d",time()));//今天0点的时间点$timeyestoday = $timetoday - 3600*24;//今天0点的时间点,两个值之间即为昨天一天内的数据select * from 表名 where time between $timeyestoday and $timetoday ;打赏感谢支持与鼓励~