How could I store messages data into a database so that I could print it as parent child nodes in an unordered list? Each root node could have 2 child(depth) i.e. like grand father, father, & children. e.g.
-vehicle
-public
-Lorry //Lorry is lost node for root vehicle,
The fields currently I store about a msg are ID(PK),name,msg,msg_id(unique). I am thinking like if each record could have a 'parent' field that would contain 'msg_id' of the record it is a child of. Then this information could be used to retrieve all parents & all child nodes of parents. And then those could be printed in a parent child hierarchy in an unordered list.