Hi,
I\'m in the middle of writing a new website, and I have come across a stump,
I new to php and mysql (just thought I would pre warn),
the problem I have is I\'m uanble to work out the database structure and how to put it down in code, a parent sibling arrangement, ie.
I have a page that has a several main categories, and in them are sub categories, but in these sub categories can be the actuall story or content,
ie.
Computers (cat)
Linux (sub cat)
PHP (actuall content)
Distros (actuall content)
Windows (sub cat)
Software (actuall content)
I have figured out I would need at least 3 tables, 1 for the content, 1 for the categorys and 1 more for the sub section categorys, but I\'m not sure how to link them together,
I was thinking of putting the category and section ID\'s into a 2 fields in the content table, and putting their respective ID\'s into these fields, now this is where I come stuck!
I want to be able to show the content as listed above, but so far drawn a blank, the tables/fields I have are:
CONTENT:
ID (PRIMARY KEY)
title
story_content
date
categoryID
SectionID
CATEGORY:
ID (PRIMARY KEY)
category
SECTION:
ID (PRIMARY KEY)
section
Hopefully I have explained this ok, if not feel free to say.
Cheers
Mark