mysql 5 6 hierarchical recursive query

Solutions on MaxInterview for mysql 5 6 hierarchical recursive query by the best coders in the world

showing results for - "mysql 5 6 hierarchical recursive query"
Richard
22 Aug 2017
1select  id,
2        name,
3        parent_id 
4from    (select * from products
5         order by parent_id, id) products_sorted,
6        (select @pv := '19') initialisation
7where   find_in_set(parent_id, @pv)
8and     length(@pv := concat(@pv, ',', id))