Using MySQL to add comments to an article

User avatar
james438
Site Admin
Site Admin
Posts: 321
Joined: Tue Nov 24, 2009 11:13 pm
Gender: Male
Location: Iowa

Using MySQL to add comments to an article

Postby james438 » Mon Dec 17, 2012 6:12 am

Here is a bit of MySQL that I use to display comments from phpBB to an article. This is from one of my private articles that I have for my own personal reading.

Code: Select all

SELECT user_id, username, post_text, poster_id, post_time FROM phpbb3_users INNER JOIN phpbb3_posts ON phpbb3_users.user_id=phpbb3_posts.poster_id WHERE topic_id=2 ORDER BY post_time ASC LIMIT 1,999


I need to look at it a little more closely again to know all of the ins and outs of that little script. I can probably still answer a few questions about it if there are any.
User avatar
keymaster
Global Moderator
Global Moderator
Posts: 216
Joined: Thu May 24, 2012 2:47 am

Re: Using MySQL to add comments to an article

Postby keymaster » Thu Dec 20, 2012 12:37 am

So any comments that are posted here, would also be visible on the article?
Daddy, why doesn't the magnet pick up your floppy discs?
User avatar
james438
Site Admin
Site Admin
Posts: 321
Joined: Tue Nov 24, 2009 11:13 pm
Gender: Male
Location: Iowa

Re: Using MySQL to add comments to an article

Postby james438 » Thu Dec 20, 2012 3:45 pm

Correct. Although I should double check the code.

Return to “MySQL”

Who is online

Users browsing this forum: No registered users and 1 guest