CASE WHEN (ParentID > 0) THEN (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID) ELSE '' END AS URLSegmentParent,
CASE WHEN (ParentID > 0) THEN (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID) ELSE '' END AS URLSegmentParent,
CASE WHEN (ParentID > 0) THEN CONCAT('/', (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID), '/', URLSegment) ELSE CONCAT('/', URLSegment) END AS URLSegmentFull,
CASE WHEN (ParentID > 0) THEN CONCAT('/', (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID), '/', URLSegment, '/') ELSE CONCAT('/', URLSegment, '/') END AS URLSegmentFull,
MenuTitle as menu FROM SiteTree_Live a ORDER BY parentID");
MenuTitle as menu FROM SiteTree_Live a ORDER BY parentID");
CASE WHEN (ParentID > 0) THEN (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID) ELSE '' END AS URLSegmentParent,
CASE WHEN (ParentID > 0) THEN (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID) ELSE '' END AS URLSegmentParent,
CASE WHEN (ParentID > 0) THEN CONCAT('/', (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID), '/', URLSegment) ELSE CONCAT('/', URLSegment) END AS URLSegmentFull,
CASE WHEN (ParentID > 0) THEN CONCAT('/', (select URLSegment from `SiteTree_Live` WHERE ID = a.ParentID), '/', URLSegment, '/') ELSE CONCAT('/', URLSegment, '/') END AS URLSegmentFull,
MenuTitle as menu FROM SiteTree_Live a ORDER BY parentID");
MenuTitle as menu FROM SiteTree_Live a ORDER BY parentID");