11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.it-ebooks.infoCHAPTER 17 • <strong>PHP</strong> AND LDAPint ldap_count_entries(resource link_id, resource result_id)The following example returns the total number of LDAP records representing individuals having alast name beginning with the letter G:$results = ldap_search($connection, $dn, "sn=G*");$count = ldap_count_entries($connection, $results);echo "Total entries retrieved: $count";This returns the following:Total entries retrieved: 45Sorting LDAP RecordsThe ldap_sort() function can sort a result set based on any of the returned result attributes. Sorting iscarried out by simply comparing the string values of each entry, rearranging them in ascending order. Itsprototype follows:boolean ldap_sort(resource link_id, resource result, string sort_filter)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!