1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 13:51:33 +02:00

Prepare Elasticsearch

This commit is contained in:
Jakub Vrana
2013-07-09 17:38:13 -07:00
parent fc427f4f3a
commit b788a9e69b
13 changed files with 320 additions and 37 deletions

View File

@@ -245,21 +245,19 @@ if (!$columns && support("table")) {
$page = floor(max(0, $found_rows - 1) / $limit);
}
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
if (!$query) {
$query = "SELECT" . limit(
($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from,
($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by,
($limit != "" ? +$limit : null),
($page ? $limit * $page : 0),
"\n"
);
$select2 = $select;
if (!$select2) {
$select2[] = "*";
if ($oid) {
$select2[] = $oid;
}
}
echo $adminer->selectQuery($query);
$convert_fields = convert_fields($columns, $fields, $select);
if ($convert_fields) {
$select2[] = substr($convert_fields, 2);
}
$result = $driver->select($TABLE, $select2, $where, $group, $order, $limit, $page);
$connection->next = $_GET["next"];
$result = $connection->query($query);
$connection->next = 0;
if (!$result) {
echo "<p class='error'>" . error() . "\n";
} else {