News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Daniel Cousineau's Blog:
Hierarchical Data With PHP and MySQL
June 02, 2008 @ 12:09:37

Daniel Cousineau submitted a new blog post he's come up with that looks at using hierarchical data in a MySQL database.

I recently had fun with an all-to-common issue with SQL driven websites: hierarchical data. For those who don't like big words, think trees. Other people have already discussed storage methods, and I would actually highly suggest you read the writeup if you haven't already.

He includes a sample table you can work from and some code that can be used to generate a select (based on a $depth variable) parent/child values from it. A few simple function calls later and you have a nested array or lots of little subarrays maintaining the parent/child relationships the database has.

0 comments voice your opinion now!
hierarchical data mysql tutorial database depth



Similar Posts

Zend: Zend Framework Database Access Webinar (Oct 31st, 2007)

NorthClick Blog: Tips for creating a small but solid newsletter-system

DevShed: Building an Error Logger with the Chain of Responsibility Pattern in PHP 5

Rob Allen's Blog: More translations

PHPit.net: An introduction to Test Driven Development with PHP


Community Events











Don't see your event here?
Let us know!


database book zend package example releases cakephp conference zendframework ajax code framework application mysql security release PEAR PHP5 job developer

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework