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

@@ -256,7 +256,7 @@ if (!$columns && support("table")) {
if ($convert_fields) {
$select2[] = substr($convert_fields, 2);
}
$result = $driver->select($TABLE, $select2, $where, $group, $order, $limit, $page);
$result = $driver->select($TABLE, $select2, $where, $group, $order, $limit, $page, true);
if (!$result) {
echo "<p class='error'>" . error() . "\n";
@@ -346,7 +346,7 @@ if (!$columns && support("table")) {
}
$unique_idf = "";
foreach ($unique_array as $key => $val) {
if (strlen($val) > 64 && ($jush == "sql" || $jush == "pgsql")) {
if (($jush == "sql" || $jush == "pgsql") && strlen($val) > 64) {
$key = "MD5(" . (strpos($key, '(') ? $key : idf_escape($key)) . ")"; //! columns looking like functions
$val = md5($val);
}