From e4b188cd2cdf120b5f62757efe282bae92c71207 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Mon, 1 Sep 2008 10:25:29 +0000 Subject: [PATCH] Display found rows git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@468 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- select.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/select.inc.php b/select.inc.php index eac577dd..f085be1d 100644 --- a/select.inc.php +++ b/select.inc.php @@ -274,9 +274,12 @@ for (var i=0; > i; i++) { echo "
" . lang('Delete') . "" . (count($group) == count($select) ? " " : "") . "
\n"; echo "
" . lang('Export') . "$dump_options " . (count($group) == count($select) ? " " : "") . "
\n"; //! output, format echo "\n"; - if (intval($limit) && ($found_rows = $mysql->result($mysql->query(count($group) < count($select) ? " SELECT FOUND_ROWS()" : "SELECT COUNT(*) FROM " . idf_escape($_GET["select"]) . ($where ? " WHERE " . implode(" AND ", $where) : "")))) > $limit) { + + echo "

"; + $found_rows = (intval($limit) ? $mysql->result($mysql->query(count($group) < count($select) ? " SELECT FOUND_ROWS()" : "SELECT COUNT(*) FROM " . idf_escape($_GET["select"]) . ($where ? " WHERE " . implode(" AND ", $where) : ""))) : $result->num_rows); + if (intval($limit) && $found_rows > $limit) { $max_page = floor(($found_rows - 1) / $limit); - echo "

" . lang('Page') . ":"; + echo lang('Page') . ":"; print_page(0); if ($_GET["page"] > 3) { echo " ..."; @@ -288,8 +291,8 @@ for (var i=0; > i; i++) { echo " ..."; } print_page($max_page); - echo "

\n"; } + echo " (" . lang('%d row(s)', $found_rows) . ")

\n"; } $result->free(); }