Re: data structure help needed
| From: | Charles Kline | Date: | Sun, 04 May 2003 22:50:56 +0000 |
| Subject: | Re: data structure help needed | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27522@lists.php.net to get a copy of this message | ||
Cal,
This looks great. Thanks... exactly what I was after.
- Charles
On Sunday, May 4, 2003, at 11:32 AM, Cal Evans wrote:
http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci801943,00.html Similar situation in the tutorial, it's an org chart. =C= * Cal Evans * http://www.christianperformer.com * Stay plugged into your audience * The measure of a programmer is not the number of lines of code he writes but the number of lines he does not have to write. ----- Original Message ----- From: "Charles Kline" <ckline@rightcode.net> To: <php-db@lists.php.net> Sent: Sunday, May 04, 2003 10:30 AM Subject: [PHP-DB] data structure help neededhi all, i am developing a site where users will be related in a parent-child type relationship. my users table is like this:--PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpid | user | parent---------------------------------1 | joe | null 2 | bill | null 3 | fred | 1 4 | john | 3 5 | frank | 3etc. Any user may have many children - what I want to do is traverse the tree in such a way that I can go up the family tree from any spot and see who is related. Anyone know of a good tutorial or a point in the right direction? I think this will require some recursive statement, which I have not done in PHP or MySQL before. Thanks Charles -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php