Jump to content

[SOLVED] Forum design question to get total posts within category


Codexxx

Recommended Posts

ok my forum layout is like this

 

Category -> topics -> thread

 

When i list the categories (frontpage of forum) i want to be able to list the total posts within the topics for that category.

 

However this requires the id from the category to be written to the threads database. THis id within the link is lost when the topic link is clicked..

 

my aim is to somehow get the id from category when they post a reply in thread..

so when i want to get total posts for that category i can query the threads db with the category id...... (so i can num rows showing total posts)

 

Many forum links are set up the same way, im just unsure how they do it

i could do by setting sessions to save the id when they click the category to view, so by chance they post a reply the id is saved in session,

just i dont wanna have huge arse phpsessid links hehe

 

any thoughts? or sessions are the way?

 

cheers

Its all in the DB... Lets say someone makes a post. When that post is stored in the db it should have log the category its in and the topic its in (every category,topic and post should have a unique identifier)... So when you do a query have it count where parent_id = "What ever your parent ID is." Do you get it?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.