SELECT * FROM categories WHERE parent_id='0' AND active!='0' ORDER BY sortorder ASC