sfx Posted February 16, 2007 Report Share Posted February 16, 2007 Hei, varbūt kāds var vienkāršā veidā parādīt kā no mysql var atlasīt datus pēc hierrarhijas: ID NAME HID | 1 | name_1 | 1 | | 2 | name_2 | 1 | | 3 | name_3 | 2 | | 4 | name_4 | 1 | | 5 | name_5 | 2 | | 6 | name_6 | 2 | | 7 | name_7 | 5 | | 8 | name_8 | 3 | | 9 | name_9 | 2 | ... |100| ... Principā vajadzētu kautkā tā: name_1 > name_2> name_5 > name_7 varbūt neesmu pareizi salicis ID un HID bet ideja ceru aptuveni skaidra. Paldies. Link to comment Share on other sites More sharing options...
tk1 Posted February 16, 2007 Report Share Posted February 16, 2007 Pameklē forumā! Link to comment Share on other sites More sharing options...
andrisp Posted February 16, 2007 Report Share Posted February 16, 2007 Tas HID ir parent id ? Es īsti nesaprotu, kāda tev tā hierarhija tur ir. Ja gribam atlasīt name_1 un tā childus, tad nesanāk kā tu saki piemērā. Link to comment Share on other sites More sharing options...
Val Posted February 16, 2007 Report Share Posted February 16, 2007 (edited) imho, tas name_2 nelīmējas tajā tavā hierarhijā //labots: no apakšas itkā saprotams Edited February 16, 2007 by Val Link to comment Share on other sites More sharing options...
andrisp Posted February 16, 2007 Report Share Posted February 16, 2007 It kā jau hierarhija tomēr ir pareiza, bet tev tur daudzi elementi ir vienā līmenī, tāpēc atlasīt tieši tā kā tu prasi nemaz nav iespējams. Varētu sākt domāt tad, ja tu vēlies atlasīt sākot no name_7 un pa hierarhiju uz augšu. Link to comment Share on other sites More sharing options...
sfx Posted February 16, 2007 Author Report Share Posted February 16, 2007 ja godiigi tad der arii otraadi, ja to visu dabuut mainiigajos tad viss ok Link to comment Share on other sites More sharing options...
Recommended Posts