SQL: select * from categories where catid = '2' order by category select * from categories where catid = '40' and topcatid = '2'