下面的 mysql 命令返回 null 结果。
如何在 php 中检查这一点
SELECT (sum(`money1`) - sum(`money2`)) as sm FROM `manfeatokasb`
下面的代码不正确,无法检查空结果
if ($result['sm'] === null )
{
echo 'this command is return null result';
}
最佳答案
if (is_null($result['sm']))
{
echo 'this command is return null result';
}
关于php - 检查mysql结果为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15465392/