lundi 2 février 2015

how to display parent items with thier child items in mysql data base


i am using my sql data base i have table with following data and table name is account



id name parent-id
1 aaa null
2 bbb 1
3 ccc 2
4 ddd 1
5 eee 3


i would like to display as follows



names
aaa
bbb
ccc
eee
ddd


can any one help me i have tried a lot but i doesn't get exact requirement please help me





Aucun commentaire:

Enregistrer un commentaire