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();
复制代码 案例代码展示:
- $rs = mysqli_query($link,'select jtitle,jbeizhu,createtime from jiemu order by desc');
- $result = mysqli_query($this->conn, $this->sql);
- if (!$result) {
- printf("Error: %s\n", mysqli_error($this->conn));
- //exit();
复制代码
|
|