数据库搜索 按照时间条件

来源:互联网 发布:网络小说完本排行榜 编辑:程序博客网 时间:2024/05/18 20:08

$date格式 2015-12-10

$bengin = strtotime($date); //转换时间戳

 select * from {$this->table} where  ( time >= ".$bengin." and time < ".strtotime(" + 1 day ", $bengin).") "); //time大于$bengin时间  并且小于+1天的$bengin  即当天
0 0