Now I'm having the same problem with a situation where I need to do a select
on one table and update a second table based on the results of that first
query. Instead a loop.  Same idea ... dealing with e-mail addresses.  No
error message, but the update is never updating.  And each query needs to
run in its own cfquery tag, so I can't put the loop inside the cfquery.

Either I'm doing something terrible wrong or there is a bug is CF.  This
doesn't make any sense.  I can see in the debug info that all of the queries
are executing, but the update query shows no rows affected.

H.




> -----Original Message-----
> From: Owens, Howard [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 6:20 PM
> To:   CF-Talk
> Subject:      RE: Delete query that doesn't delete (inside a loop)
> 
> Thanks, I'll try that.
> 
> As for the question about the trim ... I had already tried it both ways.
> Trim was after it didn't work without.
> 
> H.
> 
> 
> > -----Original Message-----
> > From:       Bryan Stevenson [SMTP:[EMAIL PROTECTED]]
> > Sent:       Wednesday, September 04, 2002 5:19 PM
> > To: CF-Talk
> > Subject:    Re: Delete query that doesn't delete (inside a loop)
> > 
> > BTW do the loop inside the CFQUERY tags....much faster...don't have to
> > open
> > and close the connection for each loop
> > 
> > Bryan Stevenson B.Comm.
> > VP & Director of E-Commerce Development
> > Electric Edge Systems Group Inc.
> > t. 250.920.8830
> > e. [EMAIL PROTECTED]
> > 
> > ---------------------------------------------------------
> > Macromedia Associate Partner
> > www.macromedia.com
> > ---------------------------------------------------------
> > Vancouver Island ColdFusion Users Group
> > Founder & Director
> > www.cfug-vancouverisland.com
> > ----- Original Message -----
> > From: "Owens, Howard" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 04, 2002 5:04 PM
> > Subject: Delete query that doesn't delete (inside a loop)
> > 
> > 
> > > So, why doesn't this work
> > >
> > > <cfsetting showdebugoutput="Yes">
> > >
> > > <cfloop index="i" list="csv,list,of,bad,email,addresses">
> > >
> > > <cfquery
> > > name="DELETEADDRESSES"
> > > datasource="dsn"
> > > blockfactor="100" debug>
> > > DELETE FROM emp_jobs
> > > WHERE email = '#trim(i)#'
> > > </cfquery>
> > > </cfloop>
> > >
> > > No error message. The query is good.  I can plug in a static e-mail
> > address
> > > and it works. I can run it staticly through Query Analyzer just fine.
> > >
> > > But if I run this in a CFTemplate, no records get deleted.
> > >
> > > I'm stumped.
> > > 
> > 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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

Reply via email to