PHP » GoLang |
login |
register |
about
|
GoLang MongoCollection::count
request it (257)
GoLang replacement for PHP's MongoCollection::count
[edit | history]
MongoCollection::count(PECL mongo >=0.9.0) MongoCollection::count — Counts the number of documents in this collection Description
public int MongoCollection::count
([ array
$query = array()
[, array $options = array()
]] )Parameters
Return ValuesReturns the number of documents matching the query. Errors/ExceptionsThrows MongoResultException if the server could not execute the command due to an error. Throws MongoExecutionTimeoutException if command execution was terminated due to maxTimeMS. Changelog
ExamplesExample #1 MongoCollection::count() example
<?php The above example will output something similar to: int(3) int(1) |
more
Recently updated
more
Most requested
more
Last requests
|