justravis Posted June 27, 2007 Share Posted June 27, 2007 I am creating a music database. Each album will have a category and MAY have a sub-category. I'm thinking of making ONE category table with feilds: id, name, parent_id If it's a sub-category, the parent_id will be the id of the category in the same table. Does this sound right or is there a better way? THANK YOU! Quote Link to comment https://forums.phpfreaks.com/topic/57450-music-categories-sub-categories/ Share on other sites More sharing options...
fenway Posted June 27, 2007 Share Posted June 27, 2007 That is the way I've set up any tables, with the parent_id of the "highest" category = null. Quote Link to comment https://forums.phpfreaks.com/topic/57450-music-categories-sub-categories/#findComment-284313 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.