Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

alastair cooper
alastair cooper
28,199 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
28,199 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.