Jump to content

creating subforums or subcategories


tjhilder

Recommended Posts

Hi,

I have a table called forums

[code]
`forum_id` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL,
`subtitle` TEXT NOT NULL,
PRIMARY KEY (forum_id))
[/code]

which works well. but now I want to add sub forums, so I thought I would do it this way:

[code]`subforum` INT(11),[/code]

but it seems doing a value of (forum_id being 2 would mean subforum's going in forum_id 2 would be that X

but no idea how to group them, since I already group them by forum_id.

I have these tables also:

topics
[code]
`topic_id` INT(11) NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL,
`title` VARCHAR(100) NOT NULL,
`article` TEXT NOT NULL,
`views` INT(11) NOT NULL,
`member_id` INT(11) NOT NULL,
`forum_id` INT(11) NOT NULL,
PRIMARY KEY (topic_id))
[/code]

'replies'
[code]
`reply_id` INT(11) NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL,
`article` TEXT NOT NULL,
`member_id` INT(11) NOT NULL,
`topic_id` INT(11) NOT NULL,
PRIMARY KEY (reply_id))
[/code]

so I'm wondering if better to do a table called subforums instead? would this work better or is there a sollution to my already made table?

thanks for reading.
--
TJ

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.