mysql - Sorting the Data based on same set of columns -


i have 2 columns named country , country1 in same table having same datatype , data stored same i.e., india , united_states, country has 40 rows of data combination of india , united_states , country1 has 60 rows. need sort data based on india , united_states separately. can any1 me in this? when trying sort data either country1 gets sorted or country gets sorted not both using mysql.

#name#  #country#           #country1#        india               united states   b      united states       united states   c      india               united states   d      india               india   e                          india 

i need dis

name# #country# #country1

a india
c india d india india e india

try this:

   select * your_table country = 'india' , country1 = india order country desc, country1 desc 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -