You are here: Re: I have sub-categories but want to display full category path « PHP Programming Language « IT news, forums, messages
Re: I have sub-categories but want to display full category path

Posted by Michael Fesser on 02/02/07 15:40

..oO(Phil Latio)

>As you can see Batley, Leeds and Bradford are sub-categories of West
>Yorkshire which itself is a sub-category of England.
>
>What I want to display when I am browsing through sub-categories of links is
>not only the name of that sub-category but it's category's parents, grand
>parents and so on like the below example.

Unfortunately you can't do that with a single SQL statement (unless you
use a nested set structure, but that would be real overkill). You have
to walk up the tree in a loop and fetch every parent node until you
reach the root node.

Micha

 

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

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