1
hydrO
php code to grab most downloaded songs from debaser
  • 2005/9/18 9:46

  • hydrO

  • Not too shy to talk

  • Posts: 105

  • Since: 2004/1/8 8


Can someone post the php code to grab the 10 top downloaded songs from Debaser module?

I know this shouldn't be that hard, but i am not a php coder. I just need to post those stuffs on a non-xoops website.
Download Dhivehi mp3s
[size=x-small]http://www.gnatoll.com[/size]

2
hydrO
Re: php code to grab most downloaded songs from debaser
  • 2005/10/6 12:46

  • hydrO

  • Not too shy to talk

  • Posts: 105

  • Since: 2004/1/8 8


I was able to get it working to some extent..
Basically the following code can get the top 10 songs sorted into 3 columns of title, artist and album.

I was also able to get the title to corresponding song file, but not for the artists (genre).

Thought I would share it here.

include "mainfile.php";

include 
"mainfile.php";




$query 'SELECT xfid, title, artist, album, year, addinfo, track, genre, length, bitrate, frequence FROM dhoodi_debaser_files  WHERE approved = 1 AND views > 0 ORDER BY views DESC LIMIT 10';

$result mysql_query($query);
$nrows mysql_num_rows($result);
if(
$nrows != 0)
    {
        
        print 
"Song NameArtistAlbumn";
        for(
$j=0;$j<$nrows;$j++)
        {
            
$row mysql_fetch_array($result);
        print 
"{$row['xfid']}>" $row["title"];
            print 
"" $row["artist"];
            print 
"" $row["album"];
                        print 
"n";
        }
        print 
"n";
    }
    else    print 
"

Top Downlooads Not Available "

Download Dhivehi mp3s
[size=x-small]http://www.gnatoll.com[/size]

Login

Who's Online

383 user(s) are online (284 user(s) are browsing Support Forums)


Members: 0


Guests: 383


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits