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 trial

PHP

alastair cooper
alastair cooper
30,617 Points

I don't understand what the task is asking me to do

I am stuck on this code challenge. (integrating PHP with databases - stage 3 - step 4 - JOINING TABLES)

The instruction is to add to the following SELECT statement, but there isn't one.

I have tried to write my own, but I have got very confused.

I have this so far...

SELECT media_id, title, img, format, year, category FROM Media JOIN Media_Genres ON Media.media_id = Media_Genres.media_id LEFT OUTER JOIN Genres ON Media_Genres.genre_id = Genres.genre_id WHERE Media.media_id = Media_Genres.media_id

Can anyone help either explain the question or tell me where I am going wrong with my statement.

Thanks

Alastair Cooper

Moderator Edited: Changed Topic of Question to properly reflect the topic of the referred course.

1 Answer

alastair cooper
alastair cooper
30,617 Points

I still don't understand it, but I resolved the problem by selecting * instead of the column names

Apparently, I was missing a column!

Sorry if anyone has spent their time trying to help me.