tags:

views:

34

answers:

0

I was wondering how can I display comments and their replies using PHP & MySQL. An example would help me out very much as I don't know how to do this. In particular, a visual example would be great and I can take it from there. Thanks!

Here is my MySQL table.

CREATE TABLE comments (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
parent_comment_id INT UNSIGNED NOT NULL,
user_id INT UNSIGNED NOT NULL,
page_id INT UNSIGNED NOT NULL,
comment TEXT NOT NULL,
date_created DATETIME NOT NULL,
PRIMARY KEY (id),
KEY user_id (user_id),
KEY page_id (page_id)
);