1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 11: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

@@ -18,9 +18,10 @@
* @param array result of $adminer->selectOrderProcess()
* @param int result of $adminer->selectLimitProcess()
* @param int index of page starting at zero
* @param bool whether to print the query
* @return Min_Result
*/
function select($table, $select, $where, $group, $order, $limit, $page) {
function select($table, $select, $where, $group, $order, $limit, $page, $print = false) {
global $adminer, $jush;
$is_group = (count($group) < count($select));
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
@@ -33,7 +34,9 @@
"\n"
);
}
echo $adminer->selectQuery($query);
if ($print) {
echo $adminer->selectQuery($query);
}
return $this->_conn->query($query);
}