Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 227844 программиста и 5272 робота. Сейчас ищут 3504 программиста ...
Приступая к работе

Counting Documents in A Collection

Вернуться к: Tutorial

Now that we've inserted 101 documents (the 100 we did in the loop, plus the first one), we can check to see if we have them all using the MongoCollection::count() method.

<?php
$connection 
= new MongoClient();
$collection = $connection->database->collectionName;

echo 
$collection->count();
?>
and it should print 101.



Вернуться к: Tutorial

© 2026 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты
Разработка компании ODWR