//header ('location:music-no.php');
//exit;
include FLAPTOP;
include ('db_connect.php');
if (! $view || $view==1){
$viewby="name";
} else if ($view==2) {
$viewby="date DESC";
} else if ($view==3) {
$viewby="num DESC";
}
$sql = "SELECT * FROM downloads ORDER BY $viewby"; //where '1' ORDER BY name desc
$result = mysql_query($sql);
$num_of_rows = mysql_num_rows($result)
or die ("The query: '$query' did not return any data");
while ($row = mysql_fetch_row($result))
{
$total = $total + $row[1];
}
$result = mysql_query($sql);
?>
MUSIC - Download Statistics |
View by ">Name,
">Date, or ">Number
of Downloads
print "$total total downloads"; ?>
Files by echo $viewby; ?> (click to download) |
# of downloads |
Last downloaded |
|
while ($row = mysql_fetch_row ($result))
{
?>
print "" . $row[0]. "\n"; ?>
|
echo $row[1]; ?>
|
echo $row[2]; ?>
|
}
?>
|
|
include FLAPBOTTOM; ?>