|
MongoCursor::countCounts the number of results for this query Beschreibung
public int MongoCursor::count
([ bool
$foundOnly = FALSE
] )This method does not affect the state of the cursor: if you haven't queried yet, you can still apply limits, skips, etc. If you have started iterating through results, it will not move the current position of the cursor. If you have exhausted the cursor, it will not reset it. Parameter-Liste
RückgabewerteThe number of documents returned by this cursor's query. BeispieleBeispiel #1 MongoCursor::count example
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: int(3) int(3) int(3) int(2) Fehler/ExceptionsThrows MongoConnectionException if it cannot reach the database. |