From: AndrĂ©s Tello Date: May 25 2012 3:07pm Subject: Re: category with parentid List-Archive: http://lists.mysql.com/mysql/227538 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba6e8eb8e4bcce04c0ddb9f6 --90e6ba6e8eb8e4bcce04c0ddb9f6 Content-Type: text/plain; charset=ISO-8859-1 You have a typical hierarchical data issue, can be solved with a graph. Theory review: http://www.algorithmist.com/index.php/Graph_data_structures Mysql and PHP implementation: http://www.phpro.org/tutorials/Managing-Hierarchical-Data-with-PHP-and-MySQL.html --90e6ba6e8eb8e4bcce04c0ddb9f6--