PDA

View Full Version : SQL for a Forum



Hitman
28-12-2007, 12:05 PM
Hey, I'm making a php forum, and I'm stuck a little...

For categorys, forums and threads, how would I get them in the right place using what SQL tables?

I really have no idea, I was thinking about the categorys name (ie The Zone) then it has the forum id's in a row called "forums". Then the forums have the names... but ah, I'm unsure.

Can anybody think how it'd work? Don't post any code I just need to know how to do it, what to put in tables...

Thanks.

Tomm
28-12-2007, 01:34 PM
Use a primary key on each of the rows and just create relationships based on the primary keys.

Hitman
28-12-2007, 01:47 PM
OK, I don't think I should do that with ID's then, just with names.

Thanks Tom.

Want to hide these adverts? Register an account for free!