admin 发表于 2020-11-18 08:44

mysqli_fetch_all() expects parameter 1 to be mysqli_result, boolean given in解决方法

今天调取数据库数据时,一直报一个错: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();
}

页: [1]
查看完整版本: mysqli_fetch_all() expects parameter 1 to be mysqli_result, boolean given in解决方法