[英]Check if either column is null using insole function
I would like to check if either of the column has null in it using the isnull
function but it doesn't seem to work... When I set either of the fields to none it still returns false 我想使用isnull
函数检查任一列中是否包含null,但它似乎不起作用...当我将任何一个字段设置为none时,它仍返回false
$result = mysql_query("select Apps.Email from Apps");
$row = mysql_fetch_array($result);
My if
statement: 我的if
语句:
if(is_null($row["Person1"], $row["Person2"])){
// stuff here
}
It works fine when I change it to: 当我将其更改为:
if (is_null($row["Person1"])
Use or logic. 使用还是逻辑。
if(is_null($row["Person1"]) || is_null($row["Person2"])){
// stuff here
}
Or whatever the or symbol is in php. 或php中的或符号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.