tp6报错:[8] ErrorException in Builder.php line 490 未定义数组下标: 1

[8] ErrorException in Builder.php line 490
未定义数组下标: 1

原因是我们查询的时候给定的是一个数组,需要带上数组的下标。

例如:
 $returnRes = $Db->limit($page_, $bars)->whereSecretkey(['版权'])->select();
         

以上情况会报错。

换种写法:

  $returnRes = $Db->limit($page_, $bars)->whereSecretkey(['版权'][0])->select();

查询成功。

发布了124 篇原创文章 · 获赞 10 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_42433970/article/details/103184794