Heim > Fragen und Antworten > Hauptteil
汪汪2016-11-09 16:31:58
//如果数据表中有代表输入时间的insertdate字段,基本可以实现 //首先取得前两天的日期: $yesterday=date("Y-m-d H:i:s",strtotime('-1 day')); $thedaybeforeyesterday=date("Y-m-d H:i:s",strtotime('-2 day')); $sql=" SELECT * FROM yourtable WHERE insertdate between $yesterday and $thedaybeforeyesterday order by id asc";