Mikijs Posted July 3, 2008 Report Posted July 3, 2008 Sveiki man ir liela interese par sadu lietu. Ka lai es izvelku lidzigas vertibas 1 reizi? id | parent_id | name ---------------------------------- 1 | 0 | vards 2 | 0 | vards 2 3 | 0 | vards 3 4 | 1 | hehey 2 5 | 1 | jaosga 6 | 2 | hje9hta 7 | 2 | ias0tas 8 | 2 | jasopga tatad es velos izvlikt Parent_id, bet nevis visus tikai lai man sanaktu 0,1,2 nevis 0,0,0,1,1,2,2,2
Roze Posted July 3, 2008 Report Posted July 3, 2008 SELECT * FROM tabula GROUP BY parent_id vs SELECT DISTINCT parent_id FROM tabula
Mikijs Posted July 3, 2008 Author Report Posted July 3, 2008 oh ja ;.. pareizi group :D paldies Roze.. es atkal aizmirsu sito :D
Recommended Posts