Can someone give me an idea on how to create this database structure. Here is an example:
Table "countries": id, countryname 1, "US" 2, "DE" 3, "FR" 4, "IT"
Now I have another table "products", and there I would like to store all the countries in which this product is available:
Table "products": id,productname,countries 1,"product1",(1,2,4) // available in countries US, DE, IT. 2,"product2",(2,3,4) // available in countries DE, FR, IT.
My question is: How to create a table structure in "products" in order to be able to store several countries?
My best idea is to place a comma-separated string there (i.e., "1,2,4"), and then split that string to search for each record. But I doubt this is the best way to do this?
EDIT: Thanks everyone for your help, awesome! It was hard to choose the right answer. I finally chose Greg because he pointed me to the JOIN explanation and gave me an example of how to use it.