1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
$result = sql_query("SELECT
ba.id_cat, ba.titre,
COUNT(bb.id) as bug,
COUNT(bc.id) as com
FROM ".$NPDS_Prefix."bug_cate ba
LEFT JOIN bug bb ON ba.id_cat=bb.id_cat
LEFT JOIN bug_com bc ON ba.id_cat=bc.id_cat
WHERE ba.cat_ligne='1'
GROUP BY ba.id_cat
ORDER BY ba.titre ASC");
while ($liste_news = mysql_fetch_array($result))
{
$liste_news['titre']=stripslashes($liste_news['titre']);
echo '<tr class="bug_deux">'
.'<td> <img src="modules/'.$ModPath.'/images/fle.gif" /> <a href="'.$ThisFile.'&subop=fiche&id_cat='.$liste_news['id_cat'].'">'.aff_langue(''.$liste_news['titre'].'').'</a></td>'
.'<td align="center">'.$liste_news['bug'].'</td>'
.'<td align="center">'.$liste_news['com'].'</td>'
.'</tr>';
} |
Partager