home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows the use of ValueList --->
- <HTML>
- <HEAD>
- <TITLE>ValueList Example</TITLE>
- </HEAD>
-
- <BODY>
- <H3>ValueList Example</H3>
-
- <!--- use the contents of one 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>
-
- </BODY>
- </HTML>
-