When you get your data from the query, to create the LIST
simply do the following:
<cfset myList = ''>
<cfoutput query="ListElement">
<cfset myList = ListAppend(mylist,strSelect)>
</cfoutput>
That should generate a proper LIST to you to use
in the CFLOOP function.
>>> [EMAIL PROTECTED] 11/04/02 01:31PM >>>
Hi,
I'm looping through a query and displaying the results on my page. The
problem I'm having is it craps out on the 3rd line when I try to display
the results. Why?
I check the field in the database and it looks fine.
<cfquery name="ListElement" datasource="database" dbtype="ODBC">
SELECT *
FROM profiles
WHERE Username = '#auth#'
ORDER BY strSelect
</cfquery>
ListElement.strSelect =
'D:\test\'dir1,D:\test\dir2,D:\test\dir3,D:\test\dir4,D:\test\dir5,D:\test\dir6'
<cfform action="action.cfm" method="post">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr">
<td height="2"></td>
</tr>
<cfset columnmode = "1">
<cfloop list="#ListElement.strSelect#" index="i">
<td class="wdirlinks">
<table cellpadding="0" cellspacing="0"
border="0">
<tr valign="middle"><td
class="wdirlinks" valign="top"><input type="checkbox" name="select"
value="<cfoutput>#i#</cfoutput>"></td><td
class="wdirlinks"><cfoutput>#i#
</cfoutput></td></tr>
</table>
</td>
<cfif columnmode MOD 4 EQ 0>
</tr><tr>
</cfif>
<cfset columnmode = columnmode + 1>
</cfloop>
</tr>
</table>
</cfform>
---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com