Print value alphabetically

We take names with surnames from the database and how can we display them in alphabetical order?


Answer 1, authority 100%

Which field should I sort by?
You can do this:

SELECT * FROM `table` ORDER BY `name` ASC -   
SELECT * FROM `table` ORDER BY `name` DESC -   

Same for the last name field


Answer 2

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