1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

Merge branch 'master' into ajax

This commit is contained in:
Jakub Vrana
2010-10-19 01:45:48 +02:00
20 changed files with 30 additions and 22 deletions

View File

@@ -217,7 +217,7 @@ if (!$columns) {
$page = $_GET["page"];
if ($page == "last") {
$found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : ""));
$page = floor(($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");