It's not updating, Joe. something is wrong, it also displays nothing if i change the category id from 4 to 2. at category id 4 it shows only 7 articles, but doesn't show anything newly added to that category. i cleared the cache, set the times to 5 min, 20 min, 1 hr. nothing worked
here's my code
Code:
$mostpopularweek_get = vB::$db->query_read("
SELECT DISTINCT
ca.contentid,
cn.publishdate,
cn.nodeid,
cni.title,
cni.viewcount
FROM
".TABLE_PREFIX."cms_nodecategory cnc
JOIN
".TABLE_PREFIX."cms_node cn
ON
cnc.nodeid = cn.nodeid
JOIN
".TABLE_PREFIX."cms_article ca
ON
cn.contentid = ca.contentid
JOIN
".TABLE_PREFIX."cms_nodeinfo cni
ON
cn.nodeid = cni.nodeid
WHERE
cn.parentnode = 4
ORDER BY
cn.publishdate desc
LIMIT 20
");
$output = '';
while($article = vB::$db->fetch_array($mostpopularweek_get))
{
$output .='<div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="content.php?r='.$article[nodeid].'">'.$article[title].'</a> </h4></div>';
}