PHP List: I am doing a pretty cool gig and I have decided to map a Nodal network using a "threaded BBS"-type +/- hierarchical system. I am imitating Chapter 29 in the SAMS _PHP & MySQL_ book and I love the model. I am not having a lot of luck in mapping my MySQL DB to the model and not only that but I am getting funny "triple" repeats and recursive memory bloats and all sorts of terrible things. I am using my DB schema/structure: connections(node1,node2) contacts(contid,node,admintech) maps(node,maptype,mapurl) node_types(typeid,typedesc) nodes(nodeid,nodename,toplevel,nodetype,moreinfo,city,state,country,homepage,bandwidth) peers(peer1,peer2,transitfrom,transitto,bandwidth) people(personid,firstname,lastname,phone,cell,fax,email,moreinfo) updown(upnode,downnode,bandwidth) The only tables I am using for the "threaded nesting bulletin board" model is: nodeid, upnode, downnode, nodename, moreinfo A list of the files follows: (You can look at the source at http://www.zdev.net/i2/ I didn't include db_fns for the obvious reasons): data_valid_fns.php db_fns.php discussion_fns.php include_fns.php index.php new_node.php output_fns.php store_new_node.php treenode_class.php view_node.php images/ blah_blah.gif cancel.gif collapse.gif expand.gif index.gif minus.gif new_post.gif plus.gif post.gif reply.gif spacer.gif And this is how it barfs: http://www.internet2.edu/arena/29 So, what do you think? It should look like: Internet2 Nodes + Abilene + DANTE And when you click on the "+" or "-", then you should see it cascade only to the children. All I get is nasty "memory overflow" fun! And not three copies of everything! Here is a little bit of a way the data looks: mysql> select * from updown limit 30 -> ; +--------+----------+-----------+ | upnode | downnode | bandwidth | +--------+----------+-----------+ | 1 | 2 | 0 | | 5 | 6 | 0 | | 6 | 7 | 0 | | 2 | 3 | 0 | | 2 | 4 | 0 | | 17 | 8 | 20 | | 17 | 9 | 10 | | 17 | 10 | 20 | | 17 | 11 | 10 | | 17 | 12 | 20 | | 17 | 13 | 20 | | 17 | 14 | 20 | | 17 | 15 | 20 | | 17 | 16 | 30 | | 6 | 17 | 2 | | 5 | 17 | 34 | +--------+----------+-----------+ The IDs under 'updown.upnode' and 'updown.downnode' equal 'nodes.nodeid' And here is the other table, 'nodes': mysql> select nodeid, nodename from nodes limit 20; +--------+----------------------------------------------------+ | nodeid | nodename | +--------+----------------------------------------------------+ | 1 | Abilene | | 2 | CALRen2 | | 3 | UCLA | | 4 | Stanford | | 5 | DANTE | | 6 | JANet | | 7 | Cambridge | | 8 | Dublin City University | | 9 | Dublin Institute of Technology | | 10 | National University of Ireland, Galway | | 11 | National University of Ireland, Maynooth | | 12 | Trinity College | | 13 | University College, Dublin | | 14 | University College, Cork | | 15 | University of Limerick | | 16 | Network of Institutes of Technology (ITNet) | | 17 | HEANet | +--------+----------------------------------------------------+ I didn't include 'nodes.moreinfo' because the table is prettier this way. Anyway, If you can please help me, or at least point me in the pants or in the right direction -- and if I missed something ala glaring omission, then please ask any questions! I am using PHP ala http://www.internet2.edu/arena/29/info.php Cheers, Chris PS: Thanks in advance! -- chris abraham, managing director <[EMAIL PROTECTED]> <http://www.beehive.de> beehive North America, washington, dc, +1 202 548 0410 wk +1 202 478 0276 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]