mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 16:44:17 +02:00
MongoDB: Fix edit operations in select
This commit is contained in:
@@ -177,6 +177,7 @@ if (isset($_GET["mongo"])) {
|
||||
$class = 'MongoDB\Driver\BulkWrite';
|
||||
$bulk = new $class(array());
|
||||
$bulk->delete($where, array('limit' => $limit));
|
||||
var_dump($where);
|
||||
return $connection->executeBulkWrite("$db.$table", $bulk, 'getDeletedCount');
|
||||
}
|
||||
|
||||
@@ -277,8 +278,7 @@ if (isset($_GET["mongo"])) {
|
||||
}
|
||||
|
||||
function sql_query_where_parser($queryWhere) {
|
||||
$queryWhere = trim(preg_replace('/WHERE[\s]?[(]?\(?/', '', $queryWhere));
|
||||
$queryWhere = preg_replace('/\)\)\)$/', ')', $queryWhere);
|
||||
$queryWhere = preg_replace('~^\sWHERE \(?\(?(.+?)\)?\)?$~', '\1', $queryWhere);
|
||||
$wheres = explode(' AND ', $queryWhere);
|
||||
$wheresOr = explode(') OR (', $queryWhere);
|
||||
$where = array();
|
||||
|
Reference in New Issue
Block a user