Quote:
Originally Posted by Lynne
If that one is for a week, and you want for all time, you need to remove the part that queries based on the time:
PHP Code:
AND
cn.publishdate>'".$starttime."'
|
Thanks, but no luck.
Okay, so I've removed the
PHP Code:
AND
cn.publishdate>'".$starttime."'
but the widget still comes out blank

, my code now reads like this:
PHP Code:
ob_start();
// Current Week Most Viewed
$starttime = time() - (3600*24*7);
$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.setpublish = 1
ORDER BY
cni.viewcount desc LIMIT 5
");
I've put the widget on left of
http://rekjoubek.com/content/section/11-design.html
to test it.
Could someone please tell me why it still shows nothing. Any help is extremely welcome.