Reply to Re: Threading articles from a SQL DB using PHP

Your name:

Reply:


Posted by Martyr2 on 09/19/05 22:33

I had come across a similiar exercise in a C++ class I had in college.
What you are describing is a binary tree (except in this case it has
more than just two children), where the branches show generations. I
have to tell you the methodology in C++ and then you can apply it in
PHP. We solved this through the use of a linked list with a set of
pointers and recursion. Each object points to its children and while
the pointers are not null, it calls the childs method and starts the
process all over again until it reaches the end. When it hits null, it
climbs up and down into the next child. When children are exhausted for
a given parent, it calls its parent etc back up the tree. I have found
an article which shows the ideas, problems, and a few code solutions.

http://cslibrary.stanford.edu/110/BinaryTrees.html

I hope this helps and makes sense.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация