关于PHP报错:Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, bool given in/public/class/db.class.php on line 87

老巴夺 27 0
查询数据库的时候,如果为区域查询有问题508行;
例如:
  • Array ([show_date] => Array ( [0] => Array ( [0] => egt [1] => 2014-04-02 ) [1] => Array ( [0] => elt [1] => 2014-05-03 ) ) )


Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, bool given in E:XAMPPhtdocscourlogin.php on line
连接数据库时发生了这个问题
但是又不知道问题何在就很烦!
PS:mysqli_fetch_array() 也可以这样子去使用 然后在在代码内输入       if (!$result) {                    printf("Error: %s", mysqli_error($link));                    exit();                } "show_date"对应的数组最好没有加入"AND"会报"Warning: strtoupper() expects parameter 1 to be string, array given in /webser/www/code/TPfaremwork/ThinkPHP/Lib/Core/Db.class.php on line 87"
可以将87行的代码改为:

  • $rule  = ( isset($val[$count-1]) && !is_array($val[$count-1]) ) ? strtoupper($val[$count-1]) : '';