RE: Net::LDAP Search Filter

"Zachary, Carlton - Hoboken" <[email protected]> Thu, 25 Apr 2013 10:02:48 -0400
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
Thanks Graham.

-----Original Message-----
From: Graham Barr [mailto:[email protected]] 
Sent: Thursday, April 25, 2013 9:31 AM
To: Zachary, Carlton - Hoboken
Cc: [email protected]
Subject: Re: Net::LDAP Search Filter


On Apr 25, 2013, at 08:26 , "Zachary, Carlton - Hoboken" <[email protected]> wrote:

> Hello all,
> 
> I am trying to run this search against my directory service with the following filter and it returns nothing.
> 
> (&(employeetype=x)(employeetype=y)(objectclass=*))

that is checking

(employeetype=x) and (employeetype=y) and (objectclass=*)

of course

(employeetype=x) and (employeetype=y)

is always going to return an empty list unless x=y

maybe you wanted

(&(|(employeetype=x)(employeetype=y))(objectclass=*))

to get employees of type x or type y

Graham.