marcis Posted March 13, 2009 Report Share Posted March 13, 2009 http://defektologs.lv/2008/12/01/rekursiva-lapas-karte/ Quote Link to comment Share on other sites More sharing options...
bubu Posted March 13, 2009 Report Share Posted March 13, 2009 A ja napieciessams izvilkt viena ID visus bernus, mazbernus, mazzmazberbus u.t.t. vardu sakot Visu kas ietilpst saja zara?? Apskaties kautvai pirmo linku manā tekstā, kuru to noquotēji. Tur tieši tāds piemērs ir: Retrieving a Full Tree We can retrieve the full tree through the use of a self-join that links parents with nodes on the basis that a node's lft value will always appear between its parent's lft and rgt values: SELECT node.name FROM nested_category AS node, nested_category AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND parent.name = 'ELECTRONICS' ORDER BY node.lft; Quote Link to comment Share on other sites More sharing options...
zimulis Posted March 24, 2009 Author Report Share Posted March 24, 2009 Man isti nav skaidrs sis datubzes pieprasijums... Kas tas par node. ... ??? Kā sis pieprasijums izskatitos piem ja datubzaes alies bus nevis category_id name lft rgt Bet section_id section_name section_left section_right Jo man isti nesanca izveidot pec si piemera pieprasijumu :( Quote Link to comment Share on other sites More sharing options...
Mr.Key Posted March 24, 2009 Report Share Posted March 24, 2009 (edited) Tas piemērs ar ltr un lft labs, biju jau piemirsis par tādu lietu!! php.lv/f/ rullē!!! Un kas vēl - root nodei parent_id ir NULL, nevis 0, kā to parasti var novērot.. :) Edited March 24, 2009 by Mr.Key Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.