Comments Display, with replies
| From: | Julio Nobrega | Date: | Sat, 20 Apr 2002 21:42:58 +0000 |
| Subject: | Comments Display, with replies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93843@lists.php.net to get a copy of this message | ||
Hi list!
I have maybe an easy to solve problem, but I haven't come with a logical
way to do it. I am builing a discussion site (a la Kuro5hin.org), and
there's a sql query to retrieve comments attached to an article. It grabs
their titles, along with some more informatio. What I want is to display the
comments and the replies below them. It's been implemented in thousands of
other scripts, but I can't figure out how to do with only one sql query
(even if it uses Joins). That's important, since I expect the site to be
very popular here in Brazil (let's hope!)
So, any advices about how to display the comments like this:
- Comment 1
- Comment 2
- Comment 3
Is greatly appreciated. I am thinking about storing all comments in an
array and construct the layout from there. But still, I don't know if it's
the best choice in performance terms.
Thanks,
--
Julio Nobrega.
Tô chegando:
http://www.inerciasensorial.com.br