title: How to sort LDAP Result with LDAP Query?
body: <p>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, <code>(&amp;(FERPA=N)(|(uid=*searchphrase*)(sn=*searchphrase*)(fullName=*searchphrase*)(telephoneNumber=*searchphrase*)))</code>.</p>
  
  <p>I want to be able to sort by last name, or the LDAP variable <code>sn</code>. 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, <code>SELECT * FROM TABLE WHERE COL='criteria' ORDER BY COL;</code> Is there something similar that can be done with LDAP Queries?</p>