You are here: Re: algorithm help « PHP Programming Language « IT news, forums, messages
Re: algorithm help

Posted by denisb on 10/19/07 22:04

uidzer0 <ben.lemasurier@gmail.com> wrote:
> I'm having a little trouble writing an algorithm to create a
> hierarchal structure from a database which looks like this:
> parent_id | child_id |
> ----------------+-------------+
> 1 | 2 |
> 2 | 3 |
> 3 | 4 |
> 3 | 5 |
> 5 | 6 |
> 5 | 7 |
> I would like to put this into an array which represents the following
> structure:
> 1
> \
> 2
> \
> 3
> / \
> 4 5
> / \
> 6 7

if you understand french language :

<http://sql.developpez.com/arborescence/>

--
@@@@@
E -00 comme on est very beaux dis !
' `) /
|\_ =="

 

Navigation:

[Reply to this 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

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