php - Check if information from database is blank -
i need check if status , b blank or 0, blank doesnt work, suggestions?
 $sta = db2_result($queryexe, 'statusa');  $stb = db2_result($queryexe, 'statusb');    if ($sta=="0" or $sta=="" , $stb=="0" or $stb=="") 
you should use empty function consider 0, "0", null... empty values :
if (empty($sta) && empty($stb)) { if want stick logic, consider separate if statements in 2 parts :
if (     ($sta=="0" or $sta=="")     ,     ($stb=="0" or $stb=="") ) { 
Comments
Post a Comment