diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index 20b0fe6fd7..ba054d3674 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -1093,6 +1093,11 @@ function PMA_countQueryResults( $num_rows, $justBrowsing, $db, $table, $analyzed_sql_results ) { + /* Shortcut for not analyzed/empty query */ + if (empty($analyzed_sql_results)) { + return 0; + } + if (!PMA_isAppendLimitClause($analyzed_sql_results)) { // if we did not append a limit, set this to get a correct // "Showing rows..." message