you'll want to run the CFLOOP over the elength of the list
<cfloop index="#ind#" from="1" to="#listlen(RETURNED_LIST,",")#">
then inside the loop reference each element using
#listgetat(RETURNED_LIST,ind,",")#
</cfloop>
however, is there is a reason why you are storing a comma delimitd list in
the DB? I realise I don't know your situation but maybe a better solution
would be to break the scheme into a higher normal form, ie make an extra
table which stores the partID and the assemblyfieldID so for your example
the new table would hold (assume assemblyID = 1)
partID AssID
2 1
4 1
6 1
29 1
then you can just construct a clever query which gets this info out in one
go and then you could loop over the query in the cf loop instead
Cheers!
Louis
-----Original Message-----
From: Donald R. Pavlik [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 26 November 2000 3:01 PM
To: Fusebox
Subject: Comma Delimited lists
I have a few fields in my databases that use comma delimited lists in them,
my biggest problem is that I have not found a way where I could go through
it and have certain actions be done for each item in the list. For example,
I have a field that has all the partIds that make one part assembly in a
field, (2,4,6,29) and then I would like a link made off of this information.
I want a query done for each number, and then a link to be make out of the
drawn information put up on a web page. I know I should be able to do this
with <cfloop></cfloop> and have a <cfquery></cfquery> inside the loop for
each number, but I just don't seem to understand how to do it. I have read
my coldfusion books on it, and I just get lost on how to do it. Can any of
you help shed some light on this for me?
Thank you,
Donald Pavlik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists