affordit Posted February 6, 2008 Share Posted February 6, 2008 Is there a way to have 2 or more values in 1 field and be able to pull up that record using either value? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 6, 2008 Share Posted February 6, 2008 If you want to have multiple values, you should use another table with a one-to-many relationship. But you do have other options: 1) Separate the values with a comma. Simple, but hard to search for values. 2) Use bit values. http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html. More complicated, but better in the long run. Quote Link to comment Share on other sites More sharing options...
affordit Posted February 6, 2008 Author Share Posted February 6, 2008 What I have is a products table that has a category field and I would like toadd anothe value to that field so that I can make certian item Featured items. Like category = toys and featured is there any easy way? Quote Link to comment Share on other sites More sharing options...
p2grace Posted February 6, 2008 Share Posted February 6, 2008 Add a featured field to the database and have it be either a 1 or a 0 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.