$db = mysql_connect("localhost", "chartuser", "chrt11SDxx");
mysql_select_db("audibl2",$db);
$getlist=mysql_query("select cdnum, value from afcdcharts where cdnum like 'cd2%' order by value desc limit 0,10",$db);
if($get=mysql_fetch_row($getlist)) {
echo "Top 10 Integrity CDs at AudibleFaith \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 afsgcharts where songnum like 'sg2%' order by value desc limit 0,20",$db);
if($get=mysql_fetch_row($getlist)) {
echo "Top 20 Integrity Songs at AudibleFaith \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";
}
?>
|