Day: March 14, 2018

select rows and ignore row if column value is blank or null in MySQL

For many case we need to select all row value and ignore if column value is null or empty in MYSQL , in this case you can do this easily . This is simple code which help you.


Option 1 :

You need to check that column value empty or null

SELECT * FROM your_table where column_name IS NOT NULL or column_name != ''; // column_name is your field name


Option 2 :

You could use COALESCE() to treat blank (empty string) and NULL as the same thing:

SELECT * FROM your_table WHERE COALESCE(column_name, '') != '';

you can also do this in your php code section .

Option 3 :

$column_name = $row_Recordset1['column_name'];
if($column_name == '' || $column_name === null || is_null($column_name)){
   continue;
}

if you need any help then please inform me, i will try to help you

Comment

how to change the style of alert box?

Now we want to change website more style so normal alert box is not good to see so in this case we want to change it.
There are some library which help you a lot. This is some link which you can use

Option 1: You can use

There are lot of option to customize it. hope you will like it

Option 2 : you can also use

This is very cool and more option to customize

If you need any help then please inform me, i will try to help you

Comment