match one column value with multiple values in mysql
Ok, so I am creating a sort of online shopping service and I have a DB
that requires a field to match up against multiple other fields. They need
to be stored, so that they can be ignored and set as maybe for later
viewing. I know that setting up a comma delimited field is usually unwise,
but I cannot figure out a better way to keep track of the matches while
being able to categorize them into separate columns later on.
For eg, I have 25 products to sell and have 10 cities in which I want to
sell them. Some can be shipped to 5 cites and some can be shipped to 9
cities. Now if someone searches for products in one particular city, how
will only those products appear as a search result that are available for
sale in that city only?
Does anyone have any better way of doing this without the comma delimited
field?
 
No comments:
Post a Comment