MongoDB\Driver\WriteResult::getInsertedCount

(mongodb >=1.0.0)

MongoDB\Driver\WriteResult::getInsertedCountDescription

Опис

final public ReturnType MongoDB\Driver\WriteResult::getInsertedCount ( void )

Параметри

В цієї функції немає параметрів.

Значення, що повертаються

Помилки/Винятки

Приклади

Приклад #1 MongoDB\Driver\WriteResult::getInsertedCount() example

<?php

/* ... */

?>

Наведений вище приклад виведе щось подібне до:

...

Прогляньте Також

add a note add a note

User Contributed Notes 1 note

up
0
noam
5 years ago
In case you are trying to add an index to a collection, and the index is already there, the value of getInsertedCount() depends on the MongoDB server version.
For example, MongoDB version 2.4 consider the index as inserted, but version 3.6 does not.
To Top