close(); exit; } $query = select * from sell where community = '.$community.'; $result = $db->query($query); $num = $result->num_rows; if($num == 0) { echo 'error_noresult'; } else { for($i = 0; $i fetch_assoc(); echo row['price'].' '.['area']; } } $result->free(); $db->close();?>
回复讨论(解决方案) 11行 num_rows?
16行 $i
11行 num_rows?
16行 $inum_rows; if($num == 0) { echo 'error_noresult'; } else { for($i = 0; $i fetch_assoc(); echo row['price'].' '.['area']; } } $result->free(); $db->close();?>
奇怪,变量名前面没有加 $ ,你的页面没有报错吗?
for($i = 0; $i $row = $result->fetch_assoc();
echo $row['price'].' '.$row['area'];
}
奇怪,变量名前面没有加 $ ,你的页面没有报错吗?
for($i = 0; $i $row = $result->fetch_assoc();
echo $row['price'].' '.$row['area'];
}
没有报错,一片空白。谢谢版主,太不小心了! 从你的代码看,每个分支都会有输出的
如果是一片空白,那就表示你测代码出现了致命错误,并且没有打开 php 的错误显示功能(自己给自己找麻烦)
也可以先 把$community = $_post[community];打印出来看看。