下面是时间戳查询如果你数据库时间显示的是 2011-04-05 那就不需要 用 strtotime 时间戳转换函数
1 $timea = strtotime($_POST['timea']); 2 $timeb = strtotime($_POST['timeb']); 3 $sq2="select * from `ecs_order_info` where add_time between '$timea' and '$timeb' and `quanxian`='$dangqian' order by `order_id` DESC limit 50"; 4 $sql = mysql_query($sq2);