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 Integrating PHP with Databases Using Relational Tables Querying Multiple Tables with JOIN

Would it be better to use LEFT OUTER JOIN to join Genres table?

I understand the reason Alena used only an INNER JOIN because all of the genre fields are supposed to be completed when updated a record, but what would happen if for some reason the person who entered the record forgot to assign a genre?

For example, what would happen if we're on the details page for Elvis Forever, which is media_id 9, and if the person who uploaded the information forgot to enter the genre? Would the genre for Elvis have a NULL value, and would the Would the page break if we try to load a page with a NULL genre value?

Forgive me for asking, as I am new to this and may be wrong in my thinking, but am simply wondering if there is any validity to my question?