Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CFLOOP a textarea with comma seperated values

Posted on 2006-06-16
2
Medium Priority
?
433 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 1000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

971 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