I'm querying a rather large ldap user dataset. And I really have no way around it. I've built other smaller query's that could filter by groups, managers and other key pieces of information, but now this one query requires that I look through all users in the company (+100,000 users). The returned result set goes into a jquery autocomplete box. So that this list doesn't go completely crazy I'm using the sixth ldap_search param which allows you to limit the number of returned results. Basically if the user doesn't yet see the user they need then they should supply more characters.
$sr=ldap_search($ds, $dn, $search, $filter,0,15);
Problem is that if the limit is reached on the ldap_search, then it returns a warning message with the dataset to tell you that this is not ALL results were returned. This breaks the population of the autocomplete box. I want to be able to ignore the warnings when there are more results than the limit is configured for.
**The gotcha is that I don't want to eliminate all error messages returned from the ldap_search function. So using the php '@' suppression method is out of the question.
Does anyone know another way of dealing with this?