菜鸡一只,今天调取数据库数据时,一直报一个错:Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in E:\php
后来在网上找了一个很实用的解决方法:
只需要在php文件中写入这样几行代码,便可以“知错就改”了
$result = mysqli_query($con,$sql);
if (!$result) {
printf("Error: %s\n", mysqli_error($con));
exit();
}
转载至:https://zhidao.baidu.com/question/550445087.html
来自用户:1195056983 这位大神的回答