In which file do I write the join - the updateform that has the SELECT query or the updateaction form that has the UPDATE query?
----- Original Message ----- From: "Douglas Brown" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, April 19, 2002 10:22 PM Subject: Re: too many forms > It has to do with how you are writing your query, if you have a table that has > multiple data in a column then it is duplicating within the form. You more than > likely need to do a join if you have relational tables. > > > "Success is a journey, not a destination!!" > > > > Doug Brown > ----- Original Message ----- > From: "Judy" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Friday, April 19, 2002 6:04 PM > Subject: too many forms > > > > Can someone tell me why when I click aa link to bring up a form to update, I > do get the correct form, but I get 25 copies of it - all containing the same > information? > > > > Here's the queries I'm using: > > In the updateform file: > > > > <!--- query to get an event to update---> > > <cfquery name="GetEventtoUpdate" datasource="Events" > cachedwithin="#CreateTimeSpan(1,0,0,0)#"> > > SELECT > > Events.Title, > > Events.InterDesc, > > Events.IntraDesc, > > Events.PrintDesc, > > Events.PrintPub, > > Events.InterPub, > > Events.IntraPub, > > Events.Inactive, > > Events.Area, > > Events.Location, > > Events.Ticketed, > > Events.Kid, > > Events.Handicap, > > Events.Updatedon, > > Dates.BeginDate, > > Dates.EndDate, > > Times.EventTime, > > Times.Comment, > > Internet.BeginDate, > > Internet.EndDate, > > PPrint.BeginDate, > > PPrint.EndDate, > > Intranet.BeginDate, > > Intranet.EndDate > > FROM Events, Dates, Times, Internet, Intranet, PPrint > > WHERE Events.ID = #URL.ID# > > </cfquery> > > > > > > In the updateaction file: > > > > <cfquery name="UpdateEvent" datasource="Events"> > > UPDATE Events, Dates, times, Internet, Intranet, PPrint > > SET > > Events.Title = '#form.title#', > > Events.InterDesc = '#form.InterDesc#', > > Events.IntraDesc = '#form.IntraDesc#', > > Events.PrintDesc = '#form.PrintDesc#', > > Events.InterPub = '#form.InterPub#', > > Events.IntraPub = '#form.IntraPub#', > > Events.PrintPub = '#form.PrintPub#', > > Events.Inactive = '#form.inactive#', > > Events.Area = '#form.Area#', > > Events.location = '#form.Location#', > > Events.Ticketed = '#form.Ticketed#', > > Events.Kid = '#form.Kid#', > > Events.Handicap = '#form.Handicap#', > > Events.Updatedon = '#form.Updatedon#', > > Times.EventTime = '#form.Times.EventTime#', > > Times.Comment = '#form.Comment#', > > Dates.BeginDate = '#form.Dates.BeginDate#', > > Dates.EndDate = '#form.Dates.EndDate#', > > PPrint.BeginDate = '#form.PPrint.BeginDate#', > > PPrint.EndDate = '#form.PPrint.EndDate#', > > Internet.BeginDate = '#form.Internet.BeginDate#', > > Internet.EndDate = '#form.Internet.EndDate#', > > Intranet.BeginDate = '#form.Intranet.BeginDate#', > > Intanet.EndDate = '#form.Intranet.EndDate#' > > WHERE Events.ID = #Dates.ID# > > AND Events.ID = #Times.ID# > > AND Events.ID = #Internet.ID# > > AND Events.ID = #Intranet.ID# > > AND Events.ID = #PPrint.ID# > > </cfquery> > > > > In the event file that contains the "Edit" link to the updateform.cfm I have > this: > > > > <a href="updateform.cfm?action=edit&ID=#ID#">Edit</a> > > > > Thanks, I'm desparate for an answer tonight. > > > > Judy > > > > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

