MySQL之Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in...

解决:
在$data = mysqli_query($dbc, $query);后加上这样一段代码:

$result = mysqli_query($this->conn, $this->sql);
if (!$result) {
    printf("Error: %s\n", mysqli_error($this->conn));
    //exit();

参考文章:
https://zhidao.baidu.com/question/550445087.html

你可能感兴趣的:(PHP)