diff --git a/model/MongoStatement.php b/model/MongoStatement.php index 3e43f0a..1e86908 100644 --- a/model/MongoStatement.php +++ b/model/MongoStatement.php @@ -60,6 +60,9 @@ class MongoStatement extends DbStatement if (!$this->result) { return false; } + if (isset($this->result['retval'])) { + return $this->result['retval']; + } $row = false; switch ($style) { @@ -112,6 +115,8 @@ class MongoStatement extends DbStatement } else { return false; } + } elseif (is_int($this->result)) { + return $this->result; } return false; } @@ -151,6 +156,8 @@ class MongoStatement extends DbStatement if (is_array($result) && isset($result['values'])) { $this->result = $result['values']; } + } elseif (is_int($result)) { + $this->result = $result; } if ($request instanceof InsertMongoCommand) { $this->insertId = $request->getInsertId();