Page 1 of 1

Check for new posts in a forums

Posted: Mon Apr 20, 2009 3:53 pm
by lshaw
I have a forum set up with the tables:
Forums-id,name,description
Topics-id,forum,subject,body,author,date
Replies-id,topic,body,author,date

I have an additional table that adds a record the first time someone visits a topic:
readposts-id,user,topic
I can than tell them how many posts they have read out of the total using mysql_num_rows but this does not give them the detail of which forum the new topic is in or which forum or topic a new reply is in(i have nothing for replies currently).

Records are turned to an array using a while loop with mysql_fetch_array and I need a way of showing 'new posts' next to a forum if the record does not exsist in 'readposts' for this user. I have a session variable that stored usernames.

Sorry that this is really hard to understand but I hope someone can help me

lewis