PHP Doku:: Gets the query, fields, limit, and skip for this cursor - mongocursor.info.html

Verlauf / Chronik / History: (3) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenMongoDB Native DriverCore ClassesThe MongoCursor classMongoCursor::info

Ein Service von Reinhard Neidl - Webprogrammierung.

The MongoCursor class

<<MongoCursor::immortal

MongoCursor::key>>

MongoCursor::info

(PECL mongo >=1.0.5)

MongoCursor::infoGets the query, fields, limit, and skip for this cursor

Beschreibung

public array MongoCursor::info ( void )

This can be called before or after the query.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns the namespace, limit, skip, query, and fields for this cursor. In version 1.0.10+, it also returns whether the cursor is pre- or post-query.

Beispiele

Beispiel #1 MongoCursor::info() example

<?php

$m 
= new Mongo();
$cursor $m->foo->bar->find(array("x" => 4), array("y" => false));
var_dump($cursor->info());

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

array(5) {
  ["ns"]=>
  string(7) "foo.bar"
  ["limit"]=>
  int(0)
  ["skip"]=>
  int(0)
  ["query"]=>
  array(1) {
    ["x"]=>
    int(4)
  }
  ["fields"]=>
  array(1) {
    ["y"]=>
    int(0)
  }
}

Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)