Chapter 2: ColdFusion Functions
ListQualify
Returns a list with a qualifying character around each item in the list, such as double or
single quotes.
See the
List Functions
Syntax
ListQualify( list , qualifier [, delimiters ] [, elements ])
list
Any list of items or a variable that names a list.
qualifier
The character that is to be placed at the beginning and end of each item in the list.
delimiters
Set of delimiters used in list.
elements
Either the keyword "ALL" or "CHAR." If you specify "ALL," the function qualifies all
items in the list. If you specify "CHAR," the function qualifiers only items
comprised of alphabetic characters; it does not qualify numeric items.
Usage
The new list may not preserve all of the delimiters in the previous list.
Examples
<!--- This example uses ListQualify to put quotes around each
employees full name --->
<HTML>
<HEAD>
<TITLE>ListQualify Example</TITLE>
</HEAD>
<body
<CFQUERY NAME="GetEmployeeNames" DATASOURCE="cfsnippets">
SELECT FirstName, LastName
FROM Employees
</CFQUERY>
<H3>ListQualify Example</H3>
<P>This example uses ListQualify to place the full names of the employees
found
in the query within quotation marks.</P>
<CFSET myArray = ArrayNew(1)>
<!--- loop through the query and append these names
successively to the last element --->
<CFLOOP query="GetEmployeeNames">
table.
bgcolor="#FFFFD5">
423
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers