I have five tables:
models: id, name, specification models_networks: id, model_id, network_id networks: id, name, description countries_networks: id, country_id, network_id countries: id, countryName, etc, etc
- the
modelstable is connected to thenetworkstable viamodels_networkswith a many to many relation. - the
networkstable is connected to thecountriestable viacountries_networkswith a many to many relation
I need to do the following query, but I'm stuck:
Select all the models that will work in a specific country.
e.g.: say France has two networks. PigNetwork and CowNetwork. I want to get all the models that work on PigNetwork or CowNetwork, basically any that work in that country one way or the other.
If I've made myself clear, can someone help with the JOIN query please? I've only ever gone as far as joining two tables before. Thanks.