phpMyAdmin中的错误

phpMyAdmin中的错误,phpmyadmin,Phpmyadmin,我创建了带有两列(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, boo

我创建了带有两列(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,
)
我找到了解决办法

从第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
//移动到下一页或最后一页
$endpos=$\会话['tmpval']['pos']
+$\会话['tmpval']['max_rows'];
if($this->\uu get('unlim\u num\u rows')==false//查看行数未知的视图
||($endpos<$this->\uu get('unlim\u num\u rows'))
&&$this->\u get('num\u rows')>=$\u会话['tmpval']['max\u rows']
&&$\u会话['tmpval']['max\u rows']!=self::ALL\u rows)
) {
$table\u导航\u html
.=$this->\u getMoveForwardButtonsForTableNavigation(
$html\u sql\u query、$pos\u next、$is\u innodb
);
}//结束移动到

//移动到下一页或最后一页
if($this->\uu get('unlim\u num\u rows')==false//查看行数未知的视图
||($\u会话['tmpval']['max\u rows']!=self::ALL\u rows
&&$\u会话['tmpval']['pos']+$\u会话['tmpval']['max\u rows']<$this->\u get('unlim\u num\u rows'))
&&$this->\u get('num\u rows')>=$\u会话['tmpval']['max\u rows'])
) {
$table\u导航\u html
.=$this->\u getMoveForwardButtonsForTableNavigation(
$html\u sql\u query、$pos\u next、$is\u innodb
);
}//结束移动到

上面的警告消息告诉我们,此文件/usr/share/phpmyadmin/libraries/sql.lib.php的613行出现问题

那么,让我们来编辑该文件,并达到613行

||(计数($analysisted\u sql\u results['select\u expr']==1)

将此线路更换为

||(计数($analysisted\u sql\u results['select\u expr'])==1


如果仍然有任何问题,请返回。

我在Ubuntu Xenial中遵循了这些,问题得到了解决

sudo添加apt存储库ppa:phpmyadmin/ppa

sudoapt获得更新

sudo apt get安装phpmyadmin

参考文献:

请设置问题的格式。如果在phpmyadmin中执行查询时出现错误,请删除php和mysqli标记。哪个phpmyadmin版本?如何使用“插入”选项卡添加值?插入了哪些值?如果尝试插入单行作为测试,问题是否仍然存在?数据是否在错误情况下插入错误或插入失败?列
id
name
的数据类型是什么?它们是什么排序规则(如果有的话)?您使用的是哪个phpMyAdmin版本?phpMyAdmin版本4.6.5.2 id列是整数,而name列是字符这帮助我修复了它。
   // 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