How to reorganize the data in MySQL database from the highest to the lowest value in PHP

  • Thread starter Mecraft - Adel Store
  • Start date
M

Mecraft - Adel Store

Guest
I need to know is there any way to recognize the data in a MySQL database from the highest to the lowest value in numbers?

For example, this is a database:

UserName --> UserNameA | UserNameB | UserNameC | UserNameD
UserXP --> 25 | 160 | -12 | 48


Is there anything that can change the place of every row in SQL or PHP so the database can become like that:

UserName --> UserNameB | UserNameD | UserNameA | UserNameC
UserXP --> 160 | 48 | 25 | -12


Please answer me, I need to finish my project for school

NOTE: I'm using this:

$query55 = mysqli_query($GameDB, "SELECT * FROM name ORDER BY UserXP desc");


But it's not working!

Continue reading...
 
Top