How to select just the cols which are NOT NULL ? mysql -



How to select just the cols which are NOT NULL ? mysql -

i have table :

=================== col1 | col2 | col3| ------------------- 1 null 1 1 1 1 null null 1 . . .

i want write query homecoming $result , $result equal :

$result[0]{ "col1":1 , "col3":1 }; $result[1]{ "col1":1 , "col2":1 , "col3":1 }; $result[2]{ "col3":1 };

how ?

mysql

Comments

Popular posts from this blog

ruby on rails - Devise Logout Error in RoR -

model view controller - MVC Rails Planning -

php - Working with pretty urls on apache and fastcgi after hhvm installation -