SELECT
?? ?au.id,
?? ?au.name?
FROM
?? ?( SELECT id, name, parent_id FROM attract_investment_product_type WHERE parent_id <> 0 ) au,
?? ?( SELECT @pcode := '47' ) pd?
WHERE
?? ?FIND_IN_SET( parent_id, @pcode ) > 0?
?? ?AND @pcode := concat( @pcode, ',', id ) UNION
SELECT
?? ?id,
?? ?name?
FROM
?? ?attract_investment_product_type?
WHERE
?? ?id = '47';