global $empire;
$query = "select * from table where date='2017-04-20'" ;
$sql=$empire->query($query);
while($row=$empire->fetch($sql){
//code
echo $row['date']
}
global $empire;
$query = "select * from table where group by date" ;
$sql=$empire->query($query);
while($row=$empire->fetch($sql){
//code
echo $row['date']
}
//这样就能获得所有日期且不重复了
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…