How to sort LDAP Result with LDAP Query?
LDAP client applications that require results of search requests to be ordered in a repeatable way should use the server-side sort extension. In most cases, use of the server-side sort extension requires the application coder to inform the directory administrators so that proper indexing can be setup.
samwell
Updated on June 29, 2022Comments
-
samwell almost 2 years
I'm creating a LDAP directory search using PHP and we're using Novell as our LDAP server. I'm able to successfully search and return results; this is the current filter I'm running,
(&(FERPA=N)(|(uid=*searchphrase*)(sn=*searchphrase*)(fullName=*searchphrase*)(telephoneNumber=*searchphrase*)))
.I want to be able to sort by last name, or the LDAP variable
sn
. I could sort it via PHP, but I want that to be the last resort. Is there a way to sort the results based on a column. For example, in SQL you can sort based on a column like this,SELECT * FROM TABLE WHERE COL='criteria' ORDER BY COL;
Is there something similar that can be done with LDAP Queries? -
samwell about 12 yearsSOrry I might be missing something, but how does this help my question about sorting LDAP Results via LDAP Queries?
-
Terry Gardner about 12 yearsIt doesn't. It's not the simple paged results but the server-side sort extension. Sorry for the confusion.