Home  >  Article  >  Backend Development  >  Calculate the start point and end point timestamp of the day and get the data of the day_PHP tutorial

Calculate the start point and end point timestamp of the day and get the data of the day_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:11:201226browse

[php] /*

*+ ----------------------------------

* Calculate the start point and end point timestamp of the day and go to the data of the day

*+--------------------------------

*/

$daybegin=strtotime(date("Ymd"));
$dayend=$begin+86400;
$query = "SELECT * FROM `info` WHERE addtime<$dayend AND addtime>$daybegin";

/*

*+ ----------------------------------

* Calculate the start point and end point timestamp of the day and get the data of the day

*+ ----------------------------

*/

$daybegin=strtotime(date("Ymd"));
$dayend=$begin+86400;
$query = "SELECT * FROM `info` WHERE addtime<$dayend AND addtime>$daybegin";

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477384.htmlTechArticle[php] /* *+ ------------------ ---------------- * Calculate the start point and end point timestamp of the day to get the data of the day*+ -------------------- ---------- */ $daybegin=strtotime(date(Ymd)); $da...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn