1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +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

@@ -89,7 +89,7 @@ if ($_POST["save"]) {
$select = array("*");
}
if ($select) {
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1), 0);
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1), 0, true);
$row = $result->fetch_assoc();
if (isset($_GET["select"]) && (!$row || $result->fetch_assoc())) { // $result->num_rows != 1 isn't available in all drivers
$row = null;