Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 462

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
<!--- This example shows the use of CFLDAP --->
<html>
<head> <title>cfldap Query Example</title> </head>
<h3>cfldap Query Example</h3>
<body>
<p>This tool queries the Airius.com database to locate all people in the company's
Santa Clara office whose common names contain the text entered in the form.</p>
<p>Enter a full name, first name, last name, or name fragment.</p>
<form action="cfldap.cfm" method="POST">
<input type="text" name="name"><br><br>
<input type="submit" value="Search">
</form>
<!--- make the LDAP query --->
<!-- Note that some search text is required.
A search filter of cn=** would cause an error -->
<cfif (isdefined("form.name") AND (form.name IS NOT ""))>
<cfldap
server="ldap.airius.com"
action="query"
name="results"
start="ou=People, o=Airius.com"
scope="onelevel"
filter="(&(cn=*#form.Name#*)(l=Santa Clara))"
attributes="cn,sn,ou,mail,telephonenumber"
sort="ou,sn"
maxrows=100
timeout=20000
>
<!--- Display results --->
<table border=0 cellspacing=2 cellpadding=2>
<tr>
<th colspan=4><cfoutput>#results.RecordCount# matches found</cfoutput>
</th>
Last updated 1/20/2012
457

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents