Reputation: 9114
I have a few tables that I'm trying to join together, but I can't seem to figure out how to join them properly. Would anyone be able to help? I want to specify both the attractionId and gradeId values, but I keep just getting nothing when I would have thought rows should be returned. Can anyone tell me what I'm doing wrong? Thanks!
I sqlfiddled it: http://sqlfiddle.com/#!2/e2b03/2
Upvotes: 2
Views: 45
Reputation: 8210
I changed the first join to read:
INNER JOIN cirriculum_units ON cirriculum_units.cirriculumId = cirriculum_attractions.cirriculumId
instead of:
cirriculum_units.cirriculumId = cirriculum_attractions.attractionId
Upvotes: 3
Reputation: 11054
Your very first inner join has two fields in the on clause with no matching values.
Either the data is wrong or the wrong columns are named
Upvotes: 2