sorting data in phpmyadmin

daim

New member
Messages
130
Points
0
Hi guys,

Anyone know how to sort #CASHPOINTS in phpmyadmin? I dont want the sorting become like this

1

11

111

2

222

2222

but i want like this

99999

55555

9999

the most on top. thanks

 
1. login to phpMyAdmin.

2. Click on tap "sql"

3. Insert this text:

SELECT * FROM  NAME1 ORDER BY NAME2 DESC; 
NAME1 = table name where the points are saved to

NAME2  = colum where the points are saved.

4. click ok and enjoy! 

 
global_reg_value is VARCHAR type. So i wont know which value is most due it will sort as result like this

111

1111

11111

2

333

3333

not like this:

11111

3333

1111

333

1

 
figured it out:

SELECT *
FROM `global_reg_value`
WHERE `str` LIKE '#CASHPOINTS'
ORDER BY CAST(value AS DECIMAL(10,2)) DESC

 
Back
Top