| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
MongoDB\Driver\WriteResult::getWriteErrors(mongodb >=1.0.0) MongoDB\Driver\WriteResult::getWriteErrors — Returns any write errors that occurred 説明
final public array MongoDB\Driver\WriteResult::getWriteErrors
( void
)
パラメータこの関数にはパラメータはありません。 返り値Returns an array of MongoDB\Driver\WriteError objects for any write errors encountered during the write operation. The array will be empty if no write errors occurred. エラー / 例外
例例1 MongoDB\Driver\WriteResult::getWriteErrors() with a single error
<?php 上の例の出力は、 たとえば以下のようになります。 array(1) { [0]=> object(MongoDB\Driver\WriteError)#5 (4) { ["message"]=> string(81) "E11000 duplicate key error collection: db.collection index: _id_ dup key: { : 2 }" ["code"]=> int(11000) ["index"]=> int(2) ["info"]=> NULL } } 例2 MongoDB\Driver\WriteResult::getWriteErrors() with multiple errors
<?php 上の例の出力は、 たとえば以下のようになります。 array(2) { [0]=> object(MongoDB\Driver\WriteError)#5 (4) { ["message"]=> string(81) "E11000 duplicate key error collection: db.collection index: _id_ dup key: { : 2 }" ["code"]=> int(11000) ["index"]=> int(2) ["info"]=> NULL } [1]=> object(MongoDB\Driver\WriteError)#6 (4) { ["message"]=> string(81) "E11000 duplicate key error collection: db.collection index: _id_ dup key: { : 4 }" ["code"]=> int(11000) ["index"]=> int(5) ["info"]=> NULL } } |
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「MongoDB\Driver\WriteResult::getWriteErrors - Returns any write errors that occurred」をGoogle検索
|