News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Null and Empty Strings
December 03, 2008 @ 11:16:51

On DevShed today, there's a new tutorial posted looking at two things that can cause headaches for PHP developers (especially when evaluating and comparing values) - nulls and empty strings.

Anyone who has programmed for any length of time has encountered the concepts of null and empty strings. They are not the same, and confusing the two can cause some serious problems. This article deals with these concepts in the context of PHP and MySQL.

They start with a bit of a quiz before getting into how to handle them correctly - making null "safe" and working with it correctly in a MySQL context. SQL statements and table structures are included for their examples.

0 comments voice your opinion now!
null empty string tutorial mysql handle safe


blog comments powered by Disqus

Similar Posts

DevShed: Drawing More Complex Shapes with the GD Library in PHP

php|architect: Rich Internet Applications With PHP and Flex (Part 2)

Hasin Hayder's Blog: Counting occurrence of a word in a String - Benchmarking of PHP functions

Derick Rethans' Blog: Using OpenStreetMap tiles with Flickr

Tiffany Brown's Blog: PHP quickie: is_numeric() versus ctype_digit()


Community Events





Don't see your event here?
Let us know!


introduction unittest composer conference podcast opinion list release framework voicesoftheelephpant symfony language version laravel interview community api configure threedevsandamaybe series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework