update : 2015.11.03
php.shukuma.com검색:
|
Inserting a DocumentAssociative arrays are the basic object that can be saved to a collection in the database. A somewhat random "document" might be:
<?php Note that you can have nested arrays and objects. The driver will always store an associative array as an object in the database. A numerically indexed array is stored as an array in case the keys start at 0 and are not interrupted, and as an object if the array keys don't start at 0 or have gaps (ie: 0, 1, 4, 5). To insert this document, use MongoCollection::insert():
<?php See AlsoThe API documentation on MongoCollection::insert() contains more information about inserting data. |