Valuelist - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

ValueList

Description
Inserts a delimiter between each value in an executed query. ColdFusion does not evaluate the
arguments.
Returns
A delimited list of the values of each record returned from an executed query.
Category
Other
functions,
Function syntax
ValueList(query.column [, delimiter ])
See also
QuotedValueList
Parameters
Parameter
query.column
delimiter
Example
<h3>ValueList Example</h3>
<!--- use the contents of a query to create another dynamically --->
<cfquery name = "GetDepartments" datasource = "cfsnippets">
SELECT Dept_ID FROM Departments
WHERE Dept_ID IN ('BIOL')
</cfquery>
<cfquery name = "GetCourseList" datasource = "cfsnippets">
SELECT *
FROM CourseList
WHERE Dept_ID IN ('#ValueList(GetDepartments.Dept_ID)#')
</cfquery>
<cfoutput QUERY = "GetCourseList" >
<pre>#Course_ID##Dept_ID##CorNumber##CorName#</pre>
</cfoutput>
Query functions
Description
Name of an executed query and column. Separate query name and column
name with a period.
A delimiter character to separate column data items. Default: comma (,).
ValueList
735

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents