我想计算空列或某个值
$q = mysql_query("
SELECT SUM(
(`foto` = 'avatar_small.png') +
(`email` IS NULL) +
(`cidade` IS NULL) +
(`estado` IS NULL) +
(`endereco` IS NULL) +
(`numero` IS NULL) +
(`cep` IS NULL) +
(`telefone` IS NULL)
) FROM `info_complementos` WHERE id_user = ".$_SESSION['usuario_cargo']) or die(mysql_error());
$retorno = mysql_num_rows($q);
return $retorno[0];
问题是它显示了结果