View Single Post
Old 02-24-2007, 09:16 AM   #9 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,713
redhead is on a distinguished road
Just for fun, I've made a test page to illustrate how it could be done...
It is build on top of a database layout like
Code:
CREATE TABLE categories (
        id INT(11) DEFAULT '0' NOT NULL auto_increment,
        name CHAR(50) NOT NULL,
        UNIQUE id (id),
        PRIMARY KEY id (id)
);
CREATE TABLE items (
        id INT(11) DEFAULT '0' NOT NULL auto_increment,
        category INT(11) NOT NULL,
        name CHAR(50) NOT NULL,
        description BLOB,
        UNIQUE id (id),
        PRIMARY KEY id (id),
        FOREIGN KEY (category) REFERENCES categories
);
Let me know if this is what you were looking for...
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001

Last edited by redhead; 02-24-2007 at 09:57 AM.
redhead is offline   Reply With Quote