SQL: select * from categories where catid = '1' order by category select * from categories where catid = '9' and topcatid = '1'