SELECT sc.*, b.name AS brandname, b.page_alias AS brand_page_alias FROM sub_category sc LEFT JOIN brands b ON sc.parent = b.id WHERE sc.alias = '' AND sc.status = 1 LIMIT 1