Dear friends, I want to build a PHP-MySQL, JavaScript (if need) DataTree. I Have the database. (See the image first). http://img193.imageshack.us/img193/2531/treej.gif (1) I want to display Tree-branch something like the following image. (Note that I just added (id & Parent name to the left & right of country/city just for make you understand, actually you not need to display them) (2) I want to delete a branch/level. When I will delete a level then the sql data will restructured. Example: if i delete level-4 (where its have the city 'Paris') then the level-5 (DK Paris) will become level-4 in mySql. here is the MySQL table View attachment table.txt please help
A reference that may can help you http://www.sitepoint.com/hierarchical-data-database/ This page have a tree display function. So I need one level delete function.
Do you mean a treeview like this: http://www.jstree.com/demo jsTree has some good functionality like loading the data via ajax and checkbox support (for deletes) which would get you started.