The table is like this ....
ID FKItemID FKSizeID 1244 150 1 1245 150 2 1246 150 3
This shows that item 150 is available in sizeID's (whis points to sizes) 1,2 and 3
So I need to update this table where FKItemID = form.ItemID for the values passed in the form drop down list.
Make sense?
I think the delete first and then insert would be ok but doesn't this fragment the database and make it grow horribly (SQL2K)?
Regards - Paul
From: Justin <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Re: [ cf-dev ] Ok this ones more tricky Date: Tue, 3 Aug 2004 11:40:23 +0100
Are you trying to update several DBs rows based on the Primary key being in a list (modifiedsize)?
Something like
update table set row = 1 where id in (1,2,3) ???
On Aug 3, 2004, at 11:28 AM, Paul Swingewood wrote:
<cfloop index = "ListElement" list = "#form.modifiedsize#"> <cfquery name="updateitemsizes" datasource="#application.DSN#"> UPDATE tblItemSizes SET FKSizeID = '#trim(ListElement)#' WHERE FKItemID = '#trim(form.ItemID)#' </cfquery> </cfloop>
Looking at the above code I think you'll see what I am trying to do. (update the size given from a drop down multiple select where the itemID's match)
However it doesn't work. I can see that the list loop goes around n times for the size and then the query goes around n times becuase of the WHERE.
So how do I update the table for each size in the list where the itemid's match ...?
Regards - Paul
--
These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*
To unsubscribe, e-mail: [EMAIL PROTECTED]
--
These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*
To unsubscribe, e-mail: [EMAIL PROTECTED]
-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*
To unsubscribe, e-mail: [EMAIL PROTECTED]