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 trialMatt Schulze
6,311 PointsIn "Integrating PHP with Databases", quiz=JOINing Tables, I get the 'bummer-there is something wrong with your SQL.
This is the code I used.
SELECT media_id, title, img, format, year, genre_id, genre FROM Media JOIN Media_Genres ON Media_Genres.media_id = Media.media_id JOIN Genres ON Genres.genre_id = Media_Genres.genre_id WHERE Media.media_id = 3;
1 Answer
Mark Sebeck
Treehouse Moderator 38,304 PointsThe good news is you understand joins just fine. Try select * instead of the column names.
Matt Schulze
6,311 PointsMatt Schulze
6,311 PointsThanks. That worked. I don't understand why, but it worked.
Mark Sebeck
Treehouse Moderator 38,304 PointsMark Sebeck
Treehouse Moderator 38,304 PointsIt works because thatβs what the question wanted. You didnβt do anything wrong. If you look at the sample at the end of the question it says SELECT *