|
MongoCollection::countCounts the number of documents in this collection Beschreibung
public int MongoCollection::count
([ array
$query = array()
[, array $options = array()
]] )Parameter-Liste
RückgabewerteReturns the number of documents matching the query. Fehler/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
BeispieleBeispiel #1 MongoCollection::count example
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: int(3) int(1) |