MongoDB: Fix edit operations in select
This commit is contained in:
parent
84e4122225
commit
574c07b8f5
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue