See the url. http://wirl.united.net.kg/ldap_to_sql.html