If your search result is larger then the directory limit, it will just show you the maximum number of return entries possible by the directory (.e.g 2000 in some ActiveDirectories)
(PHP 4, PHP 5, PHP 7)
ldap_count_entries — Zähle die Anzahl der Einträge bei einer Suche
$link_identifier
, resource $result_identifier
)Gibt die Anzahl der Einträge, die im Ergebnis der vorherigen Suchoperation gespeichert sind, zurück.
link_identifier
Eine LDAP-Verbindungskennung, geliefert von ldap_connect().
result_identifier
Das interne LDAP-Ergebnis.
Gibt die Anzahl der Einträge im Ergebnis zurück, oder FALSE
im Fehlerfall.
Beispiel #1 ldap-count-entries() Beispiel
Retrieve number of entries in the result.
// $ds ist eine gültige Verbindungskennung (siehe ldap_connect)
$dn = 'ou=example,dc=org';
$filter = '(|(sn=Doe*)(givenname=John*))';
$justthese = array('ou', 'sn', 'givenname', 'mail');
$sr = ldap_search($ds, $dn, $filter, $justthese);
var_dump(ldap_count_entries($ds, $sr));
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
int(1)
If your search result is larger then the directory limit, it will just show you the maximum number of return entries possible by the directory (.e.g 2000 in some ActiveDirectories)