I got it, or at least it did what I've been trying to get it to do ;) May
not be elegant but it worked
For some reason it didn't like #form.week_of# so I tried this and it worked
<cfset thisWeek = form.week_of>
<cfloop list="#Form.songTitle#" index="item">
<cfquery name="current_week" datasource="#dsdata#">
INSERT INTO current_week (week_of,song_title)
VALUES ('#thisWeek#','#item#')
</cfquery>
</cfloop>
Thanks for your patience and feedback Dave! It is much appreciated!
Bob
-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 10, 2007 8:03 PM
To: CF-Talk
Subject: RE: need insert help please
> > I am passing this to:
> > <cfloop list="#Form.songTitle#" index="item"> <cfquery
> > name="current_week" datasource="#dsdata#" username="myname"
> > password="mypwd">
> > INSERT INTO current_week (song_title) VALUES ('#item#') </cfquery>
> > </cfloop>
>
> I'm not seeing where to shoe-horn the week_of value into the above
> loop, there may be 5 or 6 song_title(s) just not seeing the syntax for
> it..
Is "week_of" a field in the current_week table? If so, you can add it to
that INSERT statement. If it's a field in another table, and you want to
update the value, put another query outside your CFLOOP to do this.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized instruction
at our training centers in Washington DC, Atlanta, Chicago, Baltimore,
Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2.
Free Trial
http://www.adobe.com/products/coldfusion/flex2/
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272299
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4