Managing Hierarchical Data in MySQL by PHP