Solved

CFLOOP a textarea with comma seperated values

Posted on 2006-06-16
2
416 Views
Last Modified: 2013-12-24
Hey everyone..

I've got a form...request_gig...and it has multiple values from a javascript calendar in a textarea named "output" that is seperated with commas...so on the action page I do what exactly...basically I'm asking for someone to finish this cfloop.  Thanks.

      <cfloop list="" index="i">
      <CFQUERY name="InsertRequests" datasource="#db#">
      INSERT INTO Request_Dates(Band_ID, G_Dates )
      VALUES('#Band_ID#', '#output#')
      </CFQUERY>
      </cfloop>
      <cflocation url="requests.cfm">
0
Comment
Question by:inverted_2000
2 Comments
 
LVL 7

Accepted Solution

by:
aseusainc earned 250 total points
ID: 16922426
So #output# is a comma delimited list of dates?  If so, and you just want to insert 1 row per date, you would do this:

<cfloop index="i" list="#output#">
  <CFQUERY name="InsertRequests" datasource="#db#">
     INSERT INTO Request_Dates(Band_ID, G_Dates )
     VALUES('#Band_ID#', '#i#')
  </CFQUERY>
</cfloop>
0
 
LVL 2

Author Comment

by:inverted_2000
ID: 16922571
Sweet...That was it...I think I'm actually getting dumber as each day passes.

Thanks for your help (o:
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now