Jump to content

How do I add...


becu

Recommended Posts

sorry, i got some problems with my internet connection...couldn't online till now.
ok, I will give you a more specific one:

[code]$result = mysql_query("SELECT title, singer FROM music order by vote desc limit 10");
if (!$result) {
   echo 'Could not run query: ' . mysql_error();
   exit;
}
while ($row = mysql_fetch_row($result))
{
echo $row[0]; // 42
echo $row[1]; // the email value
}
[/code]
Output:

Song 1-----Singer 1
Song 3-----Singer 3
Song 4-----Singer 4
Song 6-----Singer 6
Song 2-----Singer 2
Song 5-----Singer 5
Song 7-----Singer 7

What I want is:

Ranking-------------Title---------------------Singer
1--------------------Song 1------------------Singer 1
2--------------------Song 3------------------Singer 3
3--------------------Song 4------------------Singer 4
4--------------------Song 6------------------Singer 6
5--------------------Song 2------------------Singer 2
6--------------------Song 5------------------Singer 5
7--------------------Song 7------------------Singer 7
it's like top ten mtv.
Thank you so much!

becu.
Link to comment
https://forums.phpfreaks.com/topic/8231-how-do-i-add/#findComment-30847
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.