require_once 'news/db.php';
require_once 'news/config.php';
<?php
require_once('news/db.php');
require_once('news/config.php');
$catcounts = DataAccess::fetch("SELECT DISTINCT
(SELECT COUNT(storyid) FROM news30_groupcats WHERE type = 'news' AND catid = news30_cats.id) AS totalposts,
name FROM news30_cats
LEFT JOIN news30_groupcats ON news30_cats.id = news30_groupcats.catid ORDER BY news30_cats.name ASC");
foreach($catcounts AS $c){
echo $c['totalposts'] . " - " . $c['name'] . "<br />";
}
?>
2 - Blog
1 - Music
1 - Updates