1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

MongoDB: Don't store unset values

This commit is contained in:
Jakub Vrana
2014-01-11 17:37:01 -08:00
parent 9824540ed8
commit ed13006512
3 changed files with 16 additions and 4 deletions

View File

@@ -249,13 +249,13 @@ function sid() {
return $return;
}
/** Shortcut for $connection->quote($string)
/** Shortcut for $driver->quote($string)
* @param string
* @return string
*/
function q($string) {
global $connection;
return $connection->quote($string);
global $driver;
return $driver->quote($string);
}
/** Get list of values from database
@@ -880,7 +880,7 @@ function process_input($field) {
return ($field["on_update"] == "CURRENT_TIMESTAMP" ? idf_escape($field["field"]) : false);
}
if ($function == "NULL") {
return "NULL";
$value = null;
}
if ($field["type"] == "set") {
return array_sum((array) $value);