Jump to content

[SOLVED] outputted order


mforan

Recommended Posts

Ok im just wondering weather it would be possible after ordering the query by "power desc" that the database order after that is also taken into consideration.

thats quite confusing to explain, so il explain a lil more, a user signs up, 1,2,3,4,5 users sign up etc.

so when the query orders them it does just this, however, if 2 of the same person have the same power value in the database, the entry higher above will come first in the outputted results echo'd

so basically, i was wondering if there is a way to bypass this and also order it by another... or is there no way to do this?

 

 

$query = "SELECT name,rank FROM users ORDER BY power DESC";

 

output:

person 1 - 2000

person 2 - 3000

person 3 - 4000

person 4 - 4000

person 5 - 5000

 

 

database from top to bottom of the entrys:

1.person 5 - 5000

2.person 3 - 4000

3.person 4 - 4000

4.person 2 - 3000

5.person 1 - 2000

 

hope this explains the problem....

 

 

Link to comment
https://forums.phpfreaks.com/topic/100523-solved-outputted-order/
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.