]> git.joonet.de Git - adminer.git/commitdiff
Fix $found_rows
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 3 Jun 2008 05:10:14 +0000 (05:10 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 3 Jun 2008 05:10:14 +0000 (05:10 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@423 7c3ca157-0c34-0410-bff1-cbf682f78f5c

select.inc.php

index b256697d6dd36a9d751cf7894af4b4c3d266e2cc..1940078cdaa7b38c24767dadb697448f4f5e2045 100644 (file)
@@ -236,7 +236,7 @@ function add_row(field) {
                        echo "</table>\n";
                        echo "<p><input type='hidden' name='token' value='$token' /><input type='submit' value='" . lang('Delete selected') . "' /> <input type='submit' name='truncate' value='" . lang('Truncate table') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\" /></p>\n";
                        echo "</form>\n";
-                       if (intval($limit) && $result->num_rows >= $limit && ($found_rows = $mysql->result($mysql->query("SELECT COUNT(*) $from"))) > $limit) {
+                       if (intval($limit) && $result->num_rows >= $limit && ($found_rows = $mysql->result($mysql->query("SELECT COUNT(*) FROM " . idf_escape($_GET["select"]) . ($where ? " WHERE " . implode(" AND ", $where) : "")))) > $limit) {
                                $max_page = floor(($found_rows - 1) / $limit);
                                function print_page($page) {
                                        echo " " . ($page == $_GET["page"] ? $page + 1 : '<a href="' . htmlspecialchars(remove_from_uri("page") . ($page ? "&page=$page" : "")) . '">' . ($page + 1) . "</a>");