Re: Get random entries from Ldap server ..
| From: | Elier | Date: | Sun, 17 Jun 2007 16:19:02 +0000 |
| Subject: | Re: Get random entries from Ldap server .. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-43698@lists.php.net to get a copy of this message | ||
I was reading about, this functionalities can be implemented using
ldap_set_options ... using the available controls of the ldap server ...
Read the RFC 2696 - LDAP Control Extension for Simple Paged Results
Manipulation,
The problem is that this implementation require Basic Encoding Rules (BER)
but I can't find anything about this in PHP.
For get random entries, maybe a control for this can be implemented ....
Any idea ?
Elier
""Elier"" <elier@iweb-solutions.net> wrote in message
news:B6.5A.48847.7A504764@pb1.pair.com...
> Get random entries from Ldap server ..
>
> Hi, I'm interesting to get random entries from ldap server ...
> but any of ldap_ fuctions do this ...
>
> I need something like this:
>
> SELECT * FROM table ORDER BY RAND() LIMIT 10;
>
> I'm thinking to work with the resource id
>
> $resource=ldap_search($conexion_ldap, $dn, $filtro, $solonecesito);
>
> maybe I need implement a new function:
> ldap_get_randentries($conexion_ldap, $resource,
>
> $count), but first I want to know what you think ..
>
> Best regards, Elier