Re: MySQL category tree db sorting
| From: | John W. Holmes | Date: | Fri, 19 Mar 2004 16:40:06 +0000 |
| Subject: | Re: MySQL category tree db sorting | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33541@lists.php.net to get a copy of this message | ||
From: "Age Bosma" <agebosma@home.nl>
> I'm trying to work out what the most efficient way will be to get the
> complete tree structure from top to bottom of a category tree db.
Search the archives or Google for "nested sets". That's going to be the most
efficient database scheme to use. Any parent-child-relationship solution is
going to require a lot of queries when your "trees" get large.
I second the recommendation for "SQL for Smarties" by Joe Celko, too.
Excellent book.
---John Holmes...