I'm creating an application which uses LDAP authentication. However, I'm stuck on the LDAP_SEARCH() function. Basically I need to dynamically create the base_dn from the FQDN (Fully Qualified Domain Name) which the user can specify in the settings.
e.g. DOMAIN.internal
How would I do this?