<?php
$database = & JFactory::getDBO();
$query = "SELECT asset_id FROM #__content WHERE state = 1";
$database->setQuery( $query );
$count_at = $database->loadObjectList();
$count_nbr = count($count_at);
?>
所以$count_nbr
返回所有创建和发布的文章,但我需要添加“今天”过滤器。如果某些大师可以请... 需要 2 种类型的过滤器:“1 天”和“一周”...
更新:添加$date = date (Y-m-d);
amd 修改字符串SELECT asset_id FROM #__content WHERE state = 1 AND publish_up = $date;
无助于导致 mysql Ymd H:i:s 中的 publish_up,我需要忽略时间戳...