Solved

CFLOOP a textarea with comma seperated values

Posted on 2006-06-16
2
417 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

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remove Index.php in Codeigniter 12 55
file too large for website 6 67
IIS url rewrite rule for web application 3 52
exchange 2010 turning off 3des ciphers 2 100
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

947 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

20 Experts available now in Live!

Get 1:1 Help Now