$a = 0;
if (isset($a)) {
echo 'a is exits';
}else{
echo 'a is not exits';
if (isset($a)) {
echo 'a is exits';
}else{
echo 'a is not exits';
}
输出结果是 a is exits ,写sql 查询语句的时候对于变量可能为0的时候,需要加上变量大于0的条件。否则查询出来的结果不一致。