phpMyAdmin中出错

bvpmtnay  于 2022-11-09  发布在  PHP
关注(0)|答案(4)|浏览(157)

我正在创建具有两列(ID、名称)的数据库(产品)表项,并向此列添加了值,然后显示此错误

Warning in .\libraries\DisplayResults.php#869
 A non-numeric value encountered

Backtrace

.\libraries\DisplayResults.php#4933: PMA\libraries\DisplayResults->_getTableNavigation(
integer 0,
integer 0,
boolean false,
string '',
)
.\libraries\DisplayResults.php#4378: PMA\libraries\DisplayResults->_getPlacedTableNavigations(
integer 0,
integer 0,
string 'top_direction_dropdown',
boolean false,
string '',
)
.\libraries\sql.lib.php#1685: PMA\libraries\DisplayResults->getTable(
,
array,
array,
boolean false,
)
.\libraries\sql.lib.php#1976: PMA_getHtmlForSqlQueryResultsTable(
,
string './themes/pmahomme/img/',
NULL,
array,
boolean true,
integer 1,
integer 1,
NULL,
,
array,
)
.\libraries\sql.lib.php#2199: PMA_getQueryResponseForResultsReturned(
,
array,
string 'products',
string 'items',
NULL,
NULL,
,
string './themes/pmahomme/img/',
integer 1,
integer 1,
NULL,
NULL,
NULL,
NULL,
NULL,
string 'SELECT * FROM `items`',
NULL,
)
.\libraries\sql.lib.php#2061: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'products',
string 'items',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `items`',
NULL,
NULL,
)
.\sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'products',
string 'items',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `items`',
NULL,
NULL,
)
gr8qqesn

gr8qqesn1#

我找到了解决方案here
从第867行开始替换:

// Move to the next page or to the last one
    $endpos = $_SESSION['tmpval']['pos']
        + $_SESSION['tmpval']['max_rows'];

    if ($this->__get('unlim_num_rows') === false // view with unknown number of rows
        || ($endpos < $this->__get('unlim_num_rows')
        && $this->__get('num_rows') >= $_SESSION['tmpval']['max_rows']
        && $_SESSION['tmpval']['max_rows'] != self::ALL_ROWS)
    ) {

        $table_navigation_html
            .= $this->_getMoveForwardButtonsForTableNavigation(
                $html_sql_query, $pos_next, $is_innodb
            );

    } // end move toward

// Move to the next page or to the last one
    if ($this->__get('unlim_num_rows') === false // view with unknown number of rows
        || ($_SESSION['tmpval']['max_rows'] != self::ALL_ROWS
        && $_SESSION['tmpval']['pos'] + $_SESSION['tmpval']['max_rows'] < $this->__get('unlim_num_rows')
        && $this->__get('num_rows') >= $_SESSION['tmpval']['max_rows'])
    ) {

        $table_navigation_html
            .= $this->_getMoveForwardButtonsForTableNavigation(
                $html_sql_query, $pos_next, $is_innodb
            );

    } // end move toward
b1zrtrql

b1zrtrql2#

上面的警告消息告诉我们,这个文件的613行有一个问题/usr/share/phpmyadmin/libraries/sql. lib. php
现在我们来编辑这个文件,达到613行。
|| (count($已分析的SQL结果['select_expr']== 1)
将此行替换为
|| (count($已分析的SQL结果['select_expr'])== 1
如果仍有任何问题,请恢复。

czfnxgou

czfnxgou3#

我在Ubuntu Xenial中跟踪了这些问题,问题得到了解决。
phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin
sudo apt-get更新
sudo apt-get安装phpmyadmin
参考编号:https://github.com/phpmyadmin/phpmyadmin/issues/15515

qf9go6mv

qf9go6mv4#

取消选中PhpMyAdmin中表上方的Show All复选框
:————)

相关问题