Solved

CFLOOP a textarea with comma seperated values

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Grub Broken on Ubuntu 16.04 LTS, Mate 1.14 GUI 5 245
Application launch issue with Apache Tomcat 5 63
Apache SSL and mod_rewrite not working 8 184
Soundcloud.com 4 45
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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