[thelist] function_id
Russell Griechen
russgri at bellsouth.net
Mon Mar 24 18:32:22 CST 2003
> I think what whoever was suggesting would look something like
>
> categories table:
> category cat_id parent_cat_id
> sportsmen 1 <null>
> hunters 2 1
> foxhunters 3 2
> birdhunters 4 2
??Getting closer to the 'right stuff' ??
#
#Table structure for table 'categories_sportsmen'
#
create table categories (
catid integer not null primary key,
catname varchar(100) not null,
parentcat integer null
foreign key (parentcat)
)TYPE = InnoDB; COMMENT='Categories of Persons';
INSERT INTO categories VALUES (1,'Sportsman','null');
INSERT INTO categories VALUES (2,'Hunter','1');
INSERT INTO categories VALUES (3,'FoxHunters','2');
INSERT INTO categories VALUES (4,'BirdHunters','2');
INSERT INTO categories VALUES (5,'WabbitHunters','2');
INSERT INTO categories VALUES (6,'Owner','3');
INSERT INTO categories VALUES (7,'Breeder','');
#
#Table structure for table 'persons'
#
CREATE TABLE persons(
personid bigint(12) DEFAULT '0' NOT NULL auto_increment,
name varchar(20),
catid integer (3)null,
parentcatid integer (3) null,
foreign key (personcat),
PRIMARY KEY (sportsmenID)
);TYPE = InnoDB; COMMENT='Persons Table';
INSERT INTO persons VALUES (1,'Fred','4');
INSERT INTO persons VALUES (2,'Walker','6');
*
*? Walker is also a Sportsman, Breeder, Owner,Foxhunter, WabbitHunter
*How is this coded?
*??TYPE = InnoDB;??
Russell Griechen
More information about the thelist
mailing list