I think there's a global caffeine shortage. :) We're going to have to start rationing coffee and saccharine tablets. It will have to wait tho -- right now it's time for the two minutes hate. :-P
Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 > Yea, it was a stupid mistake. Not enough caffeine today. > -----Original Message----- > From: Adrian Lynch [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 25, 2002 4:10 PM > To: CF-Talk > Subject: RE: Array Help - SOLVED > I lost this thread half way through, but why do you need > hot as a list and > an array? > Ade > -----Original Message----- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: 25 September 2002 20:53 > To: CF-Talk > Subject: RE: Array Help - SOLVED > You'll probably get better performance ( if only slightly > ) from putting > your <cfoutput> outside your loop ... just because the > cfml parser then only > has to initiate and drop the cfoutput once instead of once > for each > iteration of your loop. > Just 2c... >> I figured it out. Just FYI: >> <cfset x = ListToArray(hot, ",") > >> <cfset y = ArrayToList(x,",")> >> <CFLOOP From = "1" TO = "#ArrayLen(x)#" INDEX = >> "Counter"> >> <cfoutput><LI> #Counter#: #ListGetAt(y, >> Counter)#</cfoutput> >> </CFLOOP> >> -----Original Message----- >> From: Tony Carcieri [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, September 25, 2002 2:28 PM >> To: CF-Talk >> Subject: Array Help >> Hi everyone, >> I am developing a sales thing for our reps and I got >> yanked off a project >> to >> do it and my brain is fuzzy. >> I have a column that gets returned that is titled Hot (a >> bit field in a >> SQL >> 2K DB). This column has checkboxes that can be checked so >> that the DB will >> flag them for future contact. The check box contains a >> dual value: 1, and >> the PK. So what I would like to do is when the check box >> is checked, set >> the >> Hot field to 1 for that particular record. My problem is >> that both values >> are numbers and not text. >> I am also unsure of how to accomplish this if someone >> selects like 20 >> checkboxes. I would need to update all associated >> records. >> Thanks! >> Tony >> Here is my VERY feabile attempt thus far. I just wanted >> to make sure the >> records were coming back correctly. I haven't started the >> update to the DB >> yet. So advice there would be greatly appreciated as >> well. >> <cfset x = ListToArray(hot, ",") > >> <CFLOOP From = "1" TO = "#ArrayLen(x)#" INDEX = >> "Counter"> >> <cfoutput><LI> #Counter#: #ListGetAt(x, >> Counter)#</cfoutput> >> </CFLOOP> >> The error I get: >> Error Diagnostic Information >> An error occurred while evaluating the expression: >> #ListGetAt(x, Counter, ",")# >> Error near line 54, column 29. >> > __________________________________________________________ > ____________ > Your ad could be here. Monies from ads go to support these > lists and provide more resources for the community. > http://www.fusionauthority.com/ads.cfm > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

