How to make categories in my own forum?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yosuke_
Forum Commoner
Posts: 64
Joined: Tue Apr 13, 2004 12:29 pm

How to make categories in my own forum?

Post by yosuke_ »

Hi!
Im creating my own forum. Everything works: Post, Reply, shows reply's/view's. I can create forums, but there is a litle problem. How can I create categories. I created a table for categories: ID,title. And in my Forum table there is field called categorie_id. Can anyone give me some tips how to display categories and forums. I can't seem to have any idea.
To display forums, its realy easy, just using loop, but how about categories and forums together? Thank you!
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

whilst in a loop of getting the forums run a sub query to get all the categories

this would get each category for each forum
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

is this the best solution?
i mean is there any faster way to do this?
Post Reply