gpt4 book ai didi

sql - 参数必须是在phpmyadmin中实现Countable的数组或对象

转载 作者:行者123 更新时间:2023-12-03 20:08:29 24 4
gpt4 key购买 nike

当我尝试在phpmyadmin中查看wp_posts表时,我看到了此错误消息,但不知道它是什么意思,并且之前从未见过。

有人可以帮我尝试摆脱这种情况吗?

Warning in ./libraries/sql.lib.php#613
count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'afterhours',
string 'wp_posts',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/original/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_posts`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'afterhours',
string 'wp_posts',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/original/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_posts`',
NULL,
NULL,
)

最佳答案

这似乎是phpmyadmin - count(): Parameter must be an array or an object that implements Countable的重复项

根据链接文章上的最高答案,似乎..libraries / sql.lib.php中可能存在错误,导致代码尝试对数组(或数组)以外的内容进行count()函数。实现“可计数”的对象)。要修复它(根据链接的响应):

编辑文件'/usr/share/phpmyadmin/libraries/sql.lib.php'并替换

(count($analyzed_sql_results['select_expr'] == 1) 


带有:

(count($analyzed_sql_results['select_expr']) == 1


之所以有效,是因为:


计数不能在非数组上执行(因此会出现错误,“参数必须是数组或实现Countable的对象”)
count()中的“ == 1”是等效测试,不是数组
从count()中删除“ == 1”会留下一个count(array)函数,该函数起作用。

关于sql - 参数必须是在phpmyadmin中实现Countable的数组或对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51109440/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com