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]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.

<?php
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 
"<table border=1><tr><th>Song Name<th>Artist<th>Albumn";
        for(
$j=0;$j<$nrows;$j++)
        {
            
$row mysql_fetch_array($result);
        print 
"<tr><td><a href=(xoopsurl)/debaser/singlefile.php?id={$row['xfid']}>" $row["title"];
            print 
"<td>" $row["artist"];
            print 
"<td>" $row["album"];
                        print 
"n";
        }
        print 
"</table>n";
    }
    else    print 
"<p>Top Downlooads Not Available "
Download Dhivehi mp3s
[size=x-small]www.gnatoll.com[/size]

Login

Who's Online

188 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 188


more...

Donat-O-Meter

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

Latest GitHub Commits