Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CFLOOP a textarea with comma seperated values

Posted on 2006-06-16
2
Medium Priority
?
431 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

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 this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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