<cfloop from="1" to="#ListLen(mylist)#" index="i" step="2">
<cfset firstelement = ListGetAt(mylist,i)>
<cfset secondelement = ListGetAt(mylist,i+1)>
...
</cfloop>
-----Original Message-----
From: tony [mailto:[EMAIL PROTECTED]]
Sent: donderdag 20 februari 2003 13:44
To: CF-Talk
Subject: Using cfloop for query
I have a small problem with looping through a list of data:
I am going to scan some info into a text field it could be a hundreds of
sets of data example:
1234 (item 1) (row 1)
4321 (item 2) (row 2)
1234 (item 1) (row 3)
4321 (item 2) (row 4)
1234 (item 1) (row 5)
4321 (item 2) (row 6)
....
What I want is to use Cfloop to take row 1 and 2 and store it to the
database. then move to row 3 and 4 and store it to the database then
move to 5 and 6 and store it to the database
and so on.
and then end when there is no more data or rows
Please help in any way that you can, thanks in advance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4