We take names from the base with last names and how can they be alphabetized?

  • one
    And what does not work? Thank you, well, <a href=" google.com/search?q=MySql alphabetically"> Google </a> can I use first? - Sh4dow pm

2 answers 2

What field should be sorted? It is possible so:

SELECT * FROM `table` ORDER BY `name` ASC - по возрастанию имени SELECT * FROM `table` ORDER BY `name` DESC - по убыванию имени 

Same for last name field

    Well, if ORDER by `id` displays the lines id 1, 2, 3, 4, 5, etc ... then apparently ORDER by` name`.