下面是时间戳查询如果你数据库时间显示的是 2011-04-05 那就不需要 用 strtotime 时间戳转换函数:
$timea = strtotime($_POST['timea']);
$timeb = strtotime($_POST['timeb']);
$sq2="select * from `ecs_order_info` where add_time between '$timea' and '$timeb' and `quanxian`='$dangqian' order by `order_id` DESC limit 50";
$sql = mysql_query($sq2);
本文介绍了如何在数据库中使用时间戳进行查询,通过$_POST['timea']和$_POST['timeb']作为时间参数,执行SQL语句筛选出特定时间范围内的数据,并通过排序和限制来获取所需信息。
1595

被折叠的 条评论
为什么被折叠?



