$db = mysql_connect("localhost", "chartuser", "chrt11SDxx");
mysql_select_db("audibl2",$db);
$getlist=mysql_query("select cdnum, value from pucdcharts where cdnum like 'cd80%' order by value desc limit 0,10",$db);
if($get=mysql_fetch_row($getlist)) {
echo "Top 10 Vineyard CDs at PraiseUniverse \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 pusgcharts where songnum like 'sg80%' or songnum like 'sg89%' order by value desc limit 0,20",$db);
if($get=mysql_fetch_row($getlist)) {
echo "Top 20 Vineyard Songs at PraiseUniverse \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";
}
?>
|