SELECT * FROM site_downloads_dir
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hell/public_html/bowling/modules/Downloads.php on line 116
if a database table is empty that shouldnt cause the error?
$getdir = "SELECT * FROM $dirtbl";
echo $getdir;//this is correct
$getdir = mysql_query($getdir);// get info from db
while ($getdir = mysql_fetch_array($getdir)) {// output info from the db==-=-=-=-=-=-=-=THIS IS LINE 116-=-=-=-=
extract($getdir);// convert field names into variables
$sumofdls = mysql_num_rows(mysql_query("SELECT dlid FROM $dltbl WHERE dldid='$did' "));
echo "Directory: <a href='$modules&did=$did'>$dirname</a> No. of Downloads: $sumofdls<br>\n";// display the directory name and number of downloads in that directory
$getsubdir = mysql_query("SELECT * FROM $subdirtbl WHERE idid='$did' ");
while ($getsubdir = mysql_fetch_array($getsubdir)) {//now list the number of subdirectories in that directory
extract($getsubdir);// convert field names into variables
$sumofdlss = mysql_num_rows(mysql_query("SELECT dlid FROM $dltbl WHERE dlsdid='$sdid' "));// total number of downloads for the sub-dir
echo " Sub-Directory: <a href='$modules&did=$did&sdid=$sdid'>$subdirname</a> No. of Downloads: $sumofdlss<br>\n";
}
echo "<br><br>\n";
}