Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlex Forseth
8,017 PointsWhy am I still getting an ambiguous error? JOINing Challenge - Intermediate PHP:
First, I don't know why the following is producing an ambiguous error in regards to the JOINing challenge in the Intermediate PHP Track:
SELECT * FROM Media
JOIN Genres
ON Genres.genre_id = Media_Genres.genre_id
JOIN Media_Genres
ON Media.media_id = MediaGenres.media_id
WHERE media_id=3
;
Second,
Why are we doing challenges that involve using 'JOIN' in SQL when the lesson on 'JOIN' is not even in the Intermediate PHP track? It seems that a lot of students would get stuck here if they didn't already have previous experience using JOIN. Which they won't if they are just doing the Intermediate PHP track.
1 Answer
Jonathan Whittle
28,309 PointsSELECT * FROM Media JOIN Media_Genres ON Media.media_id = Media_Genres.media_id JOIN Genres ON Media_Genres.genre_id = Genres.genre_id WHERE Media.media_id=3;
Fernando Schlottmann
31,341 PointsFernando Schlottmann
31,341 Points