Каталог оборудования
SELECT c.categoryID as id, c.slug, case when ( c.menuPicture IS NOT NULL and c.menuPicture != '') THEN CONCAT('/published/publicdata/RUBISHOPRU/attachments/SC/products_pictures','/',c.menuPicture) else '' end as menuPicture, c.parent as parent_id, `c`.`name_ru` AS name,`cp`.`name_ru` AS cpname FROM SC_categories c inner join SC_categories cp on cp.categoryID = c.parent WHERE c.show_on_header_cbx = 0 and cp.hidden=0 and c.hidden=0 ORDER BY c.parent,cp.sort_order, cpname, c.sort_order, name