donia
donia

Reputation: 201

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

I was create Database (products) table Items with tow columns (id,name) and I added values to this columns then this errors display

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

Upvotes: 20

Views: 16702

Answers (4)

CodeToLife
CodeToLife

Reputation: 4171

uncheck Show All checkbox above the table in PhpMyAdmin

:----)

Upvotes: 1

Sujoy Ghosh
Sujoy Ghosh

Reputation: 31

I followed these in Ubuntu Xenial and the issue got resolved.

sudo add-apt-repository ppa:phpmyadmin/ppa

sudo apt-get update

sudo apt-get install phpmyadmin

Refrence: https://github.com/phpmyadmin/phpmyadmin/issues/15515

Upvotes: 1

Nilesh Patil
Nilesh Patil

Reputation: 41

Above warning messages tell that, there have an issue on 613 number of line of this file /usr/share/phpmyadmin/libraries/sql.lib.php

So let’s go to edit that file and reach on 613 lines.

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

Replace this line to

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

Revert back if still having any issue.

Upvotes: 2

SamCodeBad
SamCodeBad

Reputation: 270

I found the solution here.

Replace from line 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

with

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

Upvotes: 12

Related Questions