How to handle NULL values in mysql/php? -


in mssql server, make queries null values below:

select name, isnull(about, ''), contact `user_profile` userid=1 

but when trying same mysql gives error.

what logical , easy way handle null values in php/mysql scenario.

thanks

it's ifnull() mysql ^^ in case seems can return null value, use condition test it.

if(!$result['valuemaybenull']) -> true if 0, false or null 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -