SQL: select * from categories where catid = '6' order by category select * from categories where catid = '123' and topcatid = '6'