Getting Number of Files
Posted: Tue Jan 27, 2004 4:51 am
Hello everyone, I welcome any help.
My problem lies in the fact that I can only get the amount of files from the regular categories in my db, and not the subs. http://www.gamer-talk.net/downloads.html
The subs have the column parentid.
Thanks,
Adam
My problem lies in the fact that I can only get the amount of files from the regular categories in my db, and not the subs. http://www.gamer-talk.net/downloads.html
The subs have the column parentid.
Code: Select all
<?
$resultID99 = mysql_query("SELECT * FROM `down_cats` ORDER BY `catname` ASC", $linkID);
while ($row99 = mysql_fetch_array($resultID99))
{
$cid="$row99їcatid]";
$catname="$row99їcatname]";
$counter="$row99їcounter]";
$description="$row99їdescription]";
$parid="$row99їparentid]";
$resultID3 = mysql_query("SELECT * FROM `down_files` WHERE catid = '$parid' OR catid = '$cid';", $linkID);
$numfiles = mysql_num_rows($resultID3);
if($parid == "") {
?>
<tr><td>
<b><a href="downcat<? echo "$cid"; ?>.html"><? echo "$catname"; ?></a></b><br>
<? echo "$description"; ?></td><td valign="middle"><? echo "$numfiles"; ?></td></tr>
<? } ?>
<? } ?>Adam