Date: 07/21/05 (MySQL Communtiy) Keywords: no keywords how do you guys go about storing things (for instance as 'items' in 'categories') with subcategories... in the past, i've had 2 tables, 'categories' and 'subCategories' with 'subCategories.categoryID') and in my 'items' table used 'items.categoryID' and 'items.subCategoryID' - another way I've done it is had a field in categories called 'categories.subCategoryOf' - this field would hold the 'categories.categoryID' value of another category if you were dealing with a sub-category, otherwise it would default to 0 Source: http://www.livejournal.com/community/mysql/62820.html
|