时间:2021-07-01 10:21:17 帮助过:3人阅读
$array = array();while($row = mysql_fetch_array($result,MYSQL_ASSOC)){ $key = date('Y年m月d日',$row['time']); $array[$key][]=$row;}
$array = array();
$query = $this->db->query("要执行的 SQL");
foreach ($query->result_array() as $row)
$key = date('Y年m月d日',$row['time']);
$array[$key][]=$row;
}
$array = array();
$query = $this->db->query("要执行的 SQL");
foreach ($query->result_array() as $row)
$key = date('Y年m月d日',$row['time']);
$array[$key][]=$row;
}
判断啊,取服务器当前时间就是今天时间了,+1day,+2day,$row['time']等于就装数组$array
判断啊,取服务器当前时间就是今天时间了,+1day,+2day,$row['time']等于就装数组$array
//要执行的 SQL
$sql = "se;lect * from tb where ctime =< strtotime("+3 day",time()) and ctime >= time())";
$query = $this->db->query("要执行的 SQL");
//要执行的 SQL
$sql = "se;lect * from tb where ctime =< strtotime("+3 day",time()) and ctime >= time())";
$query = $this->db->query("要执行的 SQL");