Jump to content
  • 0
Sign in to follow this  
daim

sorting data in phpmyadmin

Question

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

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

figured it out:

 

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

Share this post


Link to post
Share on other sites
  • 0

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! 

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.