[php] /*
*+ -------------------------------
* 計算當天起始點和結束點時間戳 去當天的數據
*+ ------------------------------
*/
$daybegin=strtotime(date("Ymd"));
$dayend=$begin+86400;
$query = "SELECT * FROM `info` WHERE addtime<$dayend AND addtime>$daybegin";
/*
*+ -------------------------------
* 計算當天起始點和結束點時間戳 去當天的數據
*+ ------------------------------
*/
$daybegin=strtotime(date("Ymd"));
$dayend=$begin+86400;
$query = "SELECT * FROM `info` WHERE addtime<$dayend AND addtime>$daybegin";