ldap_count_entries(3) php man page | unix.com

Man Page: ldap_count_entries

Operating Environment: php

Section: 3

LDAP_COUNT_ENTRIES(3)							 1						     LDAP_COUNT_ENTRIES(3)

ldap_count_entries - Count the number of entries in a search

SYNOPSIS
int ldap_count_entries (resource $link_identifier, resource $result_identifier)
DESCRIPTION
Returns the number of entries stored in the result of previous search operations.
PARAMETERS
o $link_identifier - An LDAP link identifier, returned by ldap_connect(3). o $result_identifier - The internal LDAP result.
RETURN VALUES
Returns number of entries in the result or FALSE on error.
EXAMPLES
Example #1 ldap-count-entries(3) example Retrieve number of entries in the result. // $ds is a valid link identifier (see 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)); The above example will output something similar to: int(1) PHP Documentation Group LDAP_COUNT_ENTRIES(3)
Related Man Pages
ldap_errno(3) - php
ldap_get_entries(3) - php
ldap_get_values(3) - php
ldap_next_entry(3) - php
ldap_search(3) - php
Similar Topics in the Unix Linux Community
UNIX.COM 2017 Year End Summary
Status of UNIX.COM Forum Transformation
Please Welcome Ravinder Singh to the Moderation Team
Denial Of Service Attack Update