mayman212 Posted November 16, 2011 Share Posted November 16, 2011 hello all. I have a list of records, which each have a comment button, just like any forum does. when I click on the comment button it brings up the current record at the top, and a blank form, to which you enter in information. When I submit this information, I want it to show up on the main page as a child of the parent record. I want it similar to the example I've shown below: id name dob address email username 1 john smith 10/11/1986 124 Peermont Drive john.smith@yahoo.com john smith1 >> 2 Harry 15/12/1985 98 The Roundhay harry@gmail.com harry23 >>> 3 jhk 08/11/1976 65 dfgdfg gfdfg@ yahoo.com jhk345 4 john smith 10/11/1986 124 Peermont Drive john.smith@yahoo.com john smith1 >> 5 Harry 15/12/1985 98 The Roundhay harry@gmail.com harry23 >>>> 6 jhk 08/11/1976 65 dfgdfg gfdfg@ yahoo.com jhk345 I've been stuck on this for hours, and I haven't got anywhere. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/251256-php-mysql-hierachical-order/ Share on other sites More sharing options...
mayman212 Posted November 16, 2011 Author Share Posted November 16, 2011 Any ideas anyone? Quote Link to comment https://forums.phpfreaks.com/topic/251256-php-mysql-hierachical-order/#findComment-1288693 Share on other sites More sharing options...
ManiacDan Posted November 16, 2011 Share Posted November 16, 2011 Please don't bump your thread after only 20 minutes, it's against the rules and makes people (like me) stop reading and refuse to help Quote Link to comment https://forums.phpfreaks.com/topic/251256-php-mysql-hierachical-order/#findComment-1288711 Share on other sites More sharing options...
mayman212 Posted November 17, 2011 Author Share Posted November 17, 2011 anyone have anything? only thing I've found close enough to helping is a Korean website... Quote Link to comment https://forums.phpfreaks.com/topic/251256-php-mysql-hierachical-order/#findComment-1288943 Share on other sites More sharing options...
phporcaffeine Posted November 17, 2011 Share Posted November 17, 2011 You can attack that challenge from a number of ways; you could use client logic and organize the data with html, css and javascript, you could run a join query (depending on your table structure) and return everything in an associative array ... etc ... the list goes on. Generally, on this forum, you'll find a ready supply of folks (like myself and ManiacDan), highly skilled in LAMP technologies and web development; that are ready to donate their time and troubleshoot/diagnose problematic code or misinformed developers (the latter seeming to be the more common encounter). However, posts that seem to solicit someone designing a solution for you, will usually get little to no attention. So, try a come up with a solution on your own; when/if it doesn't work or you can't figure out the code that you have written, post it here and we'll be more than happy to help. The goal is to teach and learn; you don't learn by having it done for you. Quote Link to comment https://forums.phpfreaks.com/topic/251256-php-mysql-hierachical-order/#findComment-1288948 Share on other sites More sharing options...
ManiacDan Posted November 17, 2011 Share Posted November 17, 2011 You could also google for this topic, since self-referencing trees in MySQL is covered both by the mysql manual itself and by at least three articles written by the mysql dev team. Quote Link to comment https://forums.phpfreaks.com/topic/251256-php-mysql-hierachical-order/#findComment-1288949 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.