Jump to content

PHP Question


iShaun

Recommended Posts

Im making some forums software, and what i have is a table called "forums". There is a field called "parent_id" and if it is 0, its a category, if not, its a forum. If I am viewing a forum, how would I loop through parent_id's until I get to one set to 0 (a category). I am doing this for the Your Location: Forum Title > Forum Name > Topic Name thing. Help please?

Link to comment
Share on other sites

Well you should read up a little on forum creation.

 

Most typically the hierarchy goes like this:

 

Forum Category (Top Level)

-Forum

--Sub Forum

--(Sub Forum Topics)

(Topics)

Forum Category

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.