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.


If I get a set of values from a database and one of the values is NULL will it do any harm if I don't do anything to it?

I'm getting an array of values from a database and I'm using those values in multiple scenarios, the database always returns the same columns even when it returns NULL, it's worth noting that when the column returns NULL that column is not used in any way, shape or form. I could write a function so that the database doesn't return NULL on empty columns but that would be way too many lines of code but I'm not even sure if it does cause any problems. Because if not it's not even worth doing it.

So... will it bring any kind of problems to the website? Thanks in advance.