PHP-MySQL (JavaScript) Data Tree, Please HELP

Discussion in 'PHP' started by KingCobra, Sep 24, 2011.

  1. #1
    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
     
    KingCobra, Sep 24, 2011 IP
  2. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    Last edited: Sep 24, 2011
    KingCobra, Sep 24, 2011 IP
  3. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #3
    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.
     
    mfscripts, Sep 27, 2011 IP