Skip to content
Browse files

Last page with empty result (thanks to Frantisek Svoboda)

  • Loading branch information...
1 parent d8d4193 commit 31afb968bcbd5d6b158e0239ca08b3ea6436d068 @vrana committed Oct 18, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 adminer/select.inc.php
View
2 adminer/select.inc.php
@@ -209,7 +209,7 @@
$page = $_GET["page"];
if ($page == "last") {
$found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : ""));
- $page = floor(max(0, ($found_rows - 1) / $limit);
+ $page = floor(max(0, $found_rows - 1) / $limit);
}
$query = "SELECT" . limit((intval($limit) && $group && count($group) < count($select) && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from, ($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by, ($limit != "" ? intval($limit) : null), ($page ? $limit * $page : 0), "\n");

0 comments on commit 31afb96

Please sign in to comment.
Something went wrong with that request. Please try again.