What is the best way to sort a table like this:
CREATE TABLE category( id INT(10), parent_id INT(10), name VARCHAR(50) ); INSERT INTO category (
Try ORDER BY name , id at the end of your SQL query.
ORDER BY name , id
This will sort by name and use id to settle any ties.