mysql - SQL, Recursive Query -
can please me query working selecting data's tables wanted display fields connected other fields using recursive query.
my table
i have self query does'nt output connected , connected fibers query
select closure_id, fiber_id , @pv:=fiber_id 'fiber_id2' (select * tbl_map_closure_fiber order closure_id) join (select @pv:=1)tmp closure_id=@pv
just askin how can manage ouput both connected closure_id , connected fiber. please 1 .
you need join table pair related rows.
select t1.fiber_id, t2.fiber_id fiber_id2 tbl_map_closure_fiber t1 join tbl_map_closure_fiber t2 on t1.fiber_id = t2.closure_id
Comments
Post a Comment