News for hackers. Stuff that matters.
Re:I'm building a HN clone in PHP, and I need help by company on Saturday April 26, 2014 @03:44PM (#7652525)
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... this might help.

Re:I'm building a HN clone in PHP, and I need help by wocp on Saturday April 26, 2014 @03:49PM (#7652540)
Yes, 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...

Re:I'm building a HN clone in PHP, and I need help by company on Saturday April 26, 2014 @03:51PM (#7652546)
Re:I'm building a HN clone in PHP, and I need help by wocp on Saturday April 26, 2014 @03:54PM (#7652556)
I'm going to check out. Thanks!