1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to make PHP-MySQL Data Tree ?

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

  1. #1
    Dear friends,
    SEMrush
    I need a PHP-MySQL based data tree where I can add data/level or delete.
    Please read the .doc file for details (inside DataTree.zip file)

    Please see the attached document and help me. You can also provide me links where I can find such like this tutorials or code.

    Thanks in indvance.
     

    Attached Files:

    KingCobra, Sep 17, 2011 IP
    SEMrush
  2. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    612
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    4
    #2
    hi, most people wont download that for the simple fact they don't know whats in it. Post your code, and be specific about what you need.
    If you want an interface that can add/delete/overwrite /update data to an SQL database, that sounds like what you're talking about.

    To do that, turn all your variables to PHP vars. and then handle it with SQL code. Standard php/sql stuff. So i can assume you don't know PHP or SQL or ?
    If you know PHP/SQL then make yourself a standard interface with PHP that can display even simple HTML tables that 'foreach' all data to the tables and for every one have the data assigned its own PHP variable. Then next to that in the table have 2 buttons (or more) that say = "DELETE" "UPDATE" ..a standard HTML submit button with the value changed value="delete" value="update".

    When youpush the button have the button activate the PHP/SQL handler file ..OR .. have the handler function on same page,it will update or delete that data variable ,reload the page with the new or deleted data gone. That's how you do that. However you want to display the data can be an HTML question for you to design. If you want to go to the next step and make it even flashier, skip the reloading page and put the whole table inside an AJAX Div table for instant reload without page reload. (To do that, have PHP handler file with the AJAX code displaying the table data , and once the PHP handler has executed the script to correctly update or delete the data, it will also trigger the DIV table to display the current data. Removing all page reload function for fast and easy 'nice nice' pages.
     
    ezprint2008, Sep 17, 2011 IP
  3. KingCobra

    KingCobra Well-Known Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    Actually I want a data tree using PHP-MySQL like the attached image.

    I know PHP and MySQL. But I dont know how to make the MySQL tabe for for datatree and hou to display them using php.

    Someone Please make a databse table with some sample data and a php page that will display the data.
     

    Attached Files:

    KingCobra, Sep 17, 2011 IP
  4. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    612
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    4
    #4
    couldn't you simulate that with a HTML table border=0 ?
    and have the columns and rows set up where if the SQL data is a first tier put in row 1, second tier row 2 .. up to however many rows for tiers. It would give the equivalent. If you need a jpg image, just screen shot at it and save to jpg
     
    ezprint2008, Sep 17, 2011 IP
  5. KingCobra

    KingCobra Well-Known Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    Dear, actually I am new on DataTree and cant insert the technique in my head.
    Would you please give me an example with mysql tabe if you have free time. I will be thankfull to you.
     
    KingCobra, Sep 17, 2011 IP
  6. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    612
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    4
    #6
    Im a dude,thats one of the sextuplets .
    You say you know PHP and SQL, so output the results to DIV tables <div id="row1"> etc .
     
    ezprint2008, Sep 17, 2011 IP
  7. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #7
    1) You don't design the database table for a tree, you design it for the data.

    2) If you want to display the data in a tree, see http://dhtmlx.com/docs/products/dhtmlxTree/index.shtml It takes a little work to learn how to use it, but it gives you a nice tree pretty easily.
     
    Rukbat, Sep 17, 2011 IP
  8. akumar2

    akumar2 Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    search on google there are lots of tree structure,,, you can also use dxhtml tree as mentioned in the Rukbat.
     
    akumar2, Sep 20, 2011 IP
  9. akumar2

    akumar2 Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Test post..
     
    akumar2, Feb 28, 2012 IP