当月时间条件

$month   = date("Y-m");//月
if ($month != '') {
$sql = $sql . " and UNIX_TIMESTAMP(数据库时间字段) >= ".strtotime(date("Y-m",time()))." and UNIX_TIMESTAMP(数据库时间字段) <= ".time();
}
posted @ 2021-12-13 15:02  金翼使  阅读(42)  评论(0)    收藏  举报