shedokan Posted December 1, 2007 Share Posted December 1, 2007 I have a table called items with two columns one called id and the other one called catagory. is it possible to have two catagories to one item? Quote Link to comment Share on other sites More sharing options...
fenway Posted December 2, 2007 Share Posted December 2, 2007 If you mean multiple categories per record, then the answer is "no" -- what you need to do is have 3 tables -- one of items, one of categories, and a 3rd relational table that links the two IDs in unique pairs. This way, each item can have multiple categories. Quote Link to comment Share on other sites More sharing options...
shedokan Posted December 2, 2007 Author Share Posted December 2, 2007 isn't it better to have a column called catagory_2? if yes so how can I do it his way Quote Link to comment Share on other sites More sharing options...
fenway Posted December 3, 2007 Share Posted December 3, 2007 isn't it better to have a column called catagory_2? if yes so how can I do it his way No it's not better... what about when there are 3? You're going to add another field? Or 100? Quote Link to comment Share on other sites More sharing options...
shedokan Posted December 4, 2007 Author Share Posted December 4, 2007 who said I need 100 maybe I need just 10? never mind I added a colmn called catagory 2 and tat's it. your'e trying tomake it the hard way. Quote Link to comment Share on other sites More sharing options...
fenway Posted December 4, 2007 Share Posted December 4, 2007 who said I need 100 maybe I need just 10? never mind I added a colmn called catagory 2 and tat's it. your'e trying tomake it the hard way. Acutally, you're doing in the hard way... but I won't say I told you so. Quote Link to comment 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.