[Date Prev][Date Next] [Chronological] [Thread] [Top]

AW: problems with PHP search



Hi
filter with 2 args should be this way:
$filter  ="((&(sn=*". $sn ."*)(&"(givenname=*". $gn ."*)))";

Regards
Wolfgang


> -----Ursprüngliche Nachricht-----
> Von: Tom [mailto:tqueste@free.fr]
> Gesendet: Mittwoch, 14. Februar 2001 09:56
> An: openldap-software@OpenLDAP.org
> Betreff: problems with PHP search
> 
> 
> Hello All,
> 
> I'm doing some PHP pages in order to access an LDAP server. I want to
> do a search on sn and givenname.
> Look at this :
>      My filter :
>         $filter  ="(sn=*". $sn ."*)";
>         $filter .="(givenname=*". $gn ."*)";
>      My result :
>         If $sn="que" the result is :
>            name      = queste
>            givenname = thomas
>         if $sn="que" AND $gn="mas" the result is :
>            name      =
>            givenname = thomas
> 
> In fact, if I specify two arguments in my filter ($sn and $gn), the
> search result miss some results (like the name in this example).
> 
> I think that my filter isn't good. Must I do something like this :
> $filter  ="&(sn=*". $sn ."*)";
> $filter .=&"(givenname=*". $gn ."*)";
> (in order to make an "AND" operation).
> 
> Thanks for help,
> Thomas
> 
> 
>