企业网站教程
关于PHP报错:Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, bool given in/public/class/db.class.php on line 87
来源:     阅读:1835
网站管理员
发布于 2020-02-18 20:33
查看主页

查询数据库的时候,如果为区域查询有问题508行;
例如:

  1. 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行的代码改为:


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

免责声明:本文为用户发表,不代表网站立场,仅供参考,不构成引导等用途。 企业网站教程
相关推荐
出现 [function.fopen]: failed to open stream: Permission denied请进
畅言广告?一个代码帮你去除
苹果cmsv10系统如何设置幻灯图片广告图片
苹果CMSv10宝塔全自动定时采集教程
苹果cmsv10怎么添加2020和2021年份筛选

首页

消息

购物车

我的