1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 09:04:02 +02:00

MongoDB: Improve select

This commit is contained in:
Jakub Vrana
2014-01-08 23:14:37 -08:00
parent 39a68b9b14
commit a7d475e3e7
8 changed files with 44 additions and 24 deletions

View File

@@ -88,7 +88,7 @@ if (isset($_GET["elastic"])) {
class Min_Driver extends Min_SQL {
function select($table, $select, $where, $group, $order, $limit, $page) {
function select($table, $select, $where, $group, $order, $limit, $page, $print = false) {
global $adminer;
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
$data = array();
@@ -125,7 +125,9 @@ if (isset($_GET["elastic"])) {
$data["query"]["filtered"]["query"] = array("match_all" => array());
}
}
echo $adminer->selectQuery($query);
if ($print) {
echo $adminer->selectQuery("$query: " . print_r($data, true));
}
$search = $this->_conn->query($query, $data);
if (!$search) {
return false;