$db = mysql_connect("localhost", "chartuser", "chrt11SDxx");
mysql_select_db("audibl2",$db);
$getlist=mysql_query("select cdnum, value from iecdcharts where cdnum like 'cd0%' order by value desc limit 0,10",$db);
if($get=mysql_fetch_row($getlist)) {
echo "Top 10 Indie CDs at InnerEchos \n";
do {
$gettitle=mysql_query("select title, artist from cds where cdnum='$get[0]'",$db);
if ($got=mysql_fetch_row($gettitle)) {
echo "\n";
do {
$covernum=substr($get[0], 2, 6);
if ($got[1]) {
echo " | $got[0] - $got[1] | \n";
}
else {
echo " | $got[0] | \n";
}
}
while($got=mysql_fetch_row($gettitle));
echo " \n";
}
}
while($get=mysql_fetch_row($getlist));
echo " List More CDs \n";
}
else {
echo "CD charts temporarily offline \n";
}
echo " | \n";
$getlist=mysql_query("select songnum, value from iesgcharts where songnum like 'sg0%' order by value desc limit 0,20",$db);
if($get=mysql_fetch_row($getlist)) {
echo "Top 20 Indie Songs at InnerEchos \n";
do {
$gettitle=mysql_query("select title, author from songs where songnum='$get[0]'",$db);
if ($got=mysql_fetch_row($gettitle)) {
do {
if($got[1]) {
echo "$got[0] by $got[1] \n";
}
else {
echo "$got[0] \n";
}
}
while($got=mysql_fetch_row($gettitle));
}
}
while($get=mysql_fetch_row($getlist));
echo " List More Songs \n";
}
else {
echo "Song charts temporarily offline. \n";
}
?>
|