RE: [PHP-DB] Unlimited Categories

2003-01-15 Thread Daevid Vincent
Gerard Samuel > Cc: php-db > Subject: Re: [PHP-DB] Unlimited Categories > > > Use the parent/child relationship thing: > > CREATE TABLE Categories ( > CategoryID int(11) NOT NULL auto_increment, > ParentID int(11) NOT NULL default '0', > Category_Na

RE: [PHP-DB] Unlimited Categories

2003-01-13 Thread Luke Woollard
l category) Luke Woollard -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 14 January 2003 4:32 PM To: php-db Subject: [PHP-DB] Unlimited Categories Im figuring this is more of an sql question than anything else. I'm trying to figure out a table stru

Re: [PHP-DB] Unlimited Categories

2003-01-13 Thread Micah Stevens
Use the parent/child relationship thing: CREATE TABLE Categories ( CategoryID int(11) NOT NULL auto_increment, ParentID int(11) NOT NULL default '0', Category_Name tinytext NOT NULL, PRIMARY KEY (CategoryID) ) TYPE=MyISAM; So at each level you can find the subcategories by: SELECT * FRO

[PHP-DB] Unlimited Categories

2003-01-13 Thread Gerard Samuel
Im figuring this is more of an sql question than anything else. I'm trying to figure out a table structure to create unlimited depths of categorical data. I've done something for category/subcategories before, but haven't an idea how to create categories at an unlimited depth. Any pointers would