How to ignore null value while fetching the data from database table php mysql. Anyone please help me
My mysql query is :
$sql = "SELECT DISTINCT cuid FROM temp_donor_list WHERE donor_no='$name'";
Try this below code
$sql = "SELECT DISTINCT cuid FROM temp_donor_list WHERE donor_no='$name' and cuid!='' and donor_no!=''";
''(blank) is not equal to NULL. NULL is special value so you can not compare with blank string