6 ms·
You need to do self joins. You can have one comments table but there can be parent_id for each comment. http://stackoverflow.com/questions/3362038/what-is-self
by company 12y ago
You need to do self joins. You can have one comments table but there can be parent_id for each comment.
http://stackoverflow.com/questions/3362038/what-is-self-join-and-when-would-you-use-it http://stackoverflow.com/questions/3362038/what-is-self-join... this might help.
- wocp 12y agoYes, my table structure has a parent_id field. The problem is that I need know the depth, or use recursivity to get all parents. Using hierarchy and recursivity like this: http://stackoverflow.com/questions/4216875/php-reorder-array-to-reflect-parent-id-hierarchy http://stackoverflow.com/questions/4216875/php-reorder-array...