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

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -