phpMyAdmin中的错误

时间:2017-04-30 20:13:49

标签: phpmyadmin

我创建了数据库(产品)表带有拖曳列(id,name)的项目,我在此列中添加了值,然后显示此错误

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,
)

2 个答案:

答案 0 :(得分:0)

我找到了解决方法here

替换867行:

   // 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

使用

if

答案 1 :(得分:0)

以上警告消息表明,此文件的/usr/share/phpmyadmin/libraries/sql.lib.php的613行有问题

所以我们去编辑该文件并到达613行。

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

将此行替换为

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

如果仍有问题,请还原。