Good day everyone,
I am trying to manage the downloads on my website by creating categories and storing them in mysql.
I have a basic understanding of relational tables but I can't wrap my brain around how to get the tables working.
I had the first table holding the main category names:
CREATE TABLE download_cats (
id tinyint(4) NOT NULL auto_increment,
name varchar(20) default NULL,
description text,
PRIMARY KEY (id)
) TYPE=MyISAM;
then a table with sub category names:
CREATE TABLE download_sub_cats (
id tinyint(4) NOT NULL auto_increment,
cat_id tinyint(4) default NULL,
name varchar(20) default NULL,
description text,
tablename varchar(20) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
I need to make it so i can have subs of the subs :-)
I couldn't figure out how to create it because not all will have a multiple subs ( or some more then others ) so I was just gonna link to a tablename and display everything from there.
If someone can just explain how to organize the tables I would be for ever in your debt.
Some sample of info:
MAPS - > COUNTERSTRIKE -> BOMB/DEFUSE
CONFIG FILES -> CLAN MEMBER CONFIGS
PROGRAMS -> HL RELATE
Thank You to anyone who can help.