Re: How to loop over a dataset twice.

2010-06-09 Thread Marc Funaro

 I am trying to loop over a dataset twice.  I am trying using CFLOOP 
 but the 2nd CFLOOP will not process.  
 

And I'm willing to bet that whatever you're doing, you can do it in one loop, 
too :) 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334403
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-09 Thread Michael Grant


 And I'm willing to bet that whatever you're doing, you can do it in one
 loop, too :)


100% agree.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334404
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-09 Thread Jim Eisenhauer

..and if you can't you should probably be using 2 different queries.

Jim Eisenhauer


On Wed, Jun 9, 2010 at 5:46 AM, Michael Grant mgr...@modus.bz wrote:


 
  And I'm willing to bet that whatever you're doing, you can do it in one
  loop, too :)
 

 100% agree.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334405
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


How to loop over a dataset twice.

2010-06-08 Thread Dave Hatz

I am trying to loop over a dataset twice.  I am trying using CFLOOP but the 2nd 
CFLOOP will not process.  

cfquery dataset=mydsn name=dset
  select first,last from name
/cfquery

//loop through DataSet 1st time
cfloop query=dset
 
/cfloop

//Now I want to loop through the DataSet a 2nd time
cfloop query=dset
 .
/cfloop

How do I get the 2nd cfloop to loop over the DataSet without calling the query 
again?

Thanks,
Dave 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334396
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-08 Thread Jim Eisenhauer

What you have spelled out is very vague and may or may not be possible without 
knowing more about the functions you are trying to perform.

Please provide more information on what you are trying to do. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334397
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: How to loop over a dataset twice.

2010-06-08 Thread William Seiter

We will need to see more of the code. 
If the second loop doesn't work then there is probably something in the code 
that is stopping your action.
Once the query has been created, it will persist until it is erased by the code.

-Original Message-
From: Dave Hatz daveh...@hatzventures.org
Sent: Tuesday, June 08, 2010 5:45 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: How to loop over a dataset twice.


I am trying to loop over a dataset twice.  I am trying using CFLOOP but the 2nd 
CFLOOP will not process.  

cfquery dataset=mydsn name=dset
  select first,last from name
/cfquery

//loop through DataSet 1st time
cfloop query=dset
 
/cfloop

//Now I want to loop through the DataSet a 2nd time
cfloop query=dset
 .
/cfloop

How do I get the 2nd cfloop to loop over the DataSet without calling the query 
again?

Thanks,
Dave 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334398
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-08 Thread Andrew Scott

Have to agree with everyone else, we need to see more of the code.

If you have gotten a query from a datasource, the only thing that would stop
you from looping over the datasource query a second time is if you are
trashing that variable.


On Wed, Jun 9, 2010 at 10:45 AM, Dave Hatz daveh...@hatzventures.orgwrote:


 I am trying to loop over a dataset twice.  I am trying using CFLOOP but the
 2nd CFLOOP will not process.

 cfquery dataset=mydsn name=dset
  select first,last from name
 /cfquery

 //loop through DataSet 1st time
 cfloop query=dset
  
 /cfloop

 //Now I want to loop through the DataSet a 2nd time
 cfloop query=dset
  .
 /cfloop

 How do I get the 2nd cfloop to loop over the DataSet without calling the
 query again?

 Thanks,
 Dave

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334399
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-08 Thread Maureen

You don't have to call the query again.

You can just do this:
 cfquery dataset=mydsn name=dset
  select first,last from name
 /cfquery
 cfoutput query=dset
..do something
/cfoutput
 cfoutput query=dset
..do something else
/cfoutput


On Tue, Jun 8, 2010 at 5:45 PM, Dave  Hatz daveh...@hatzventures.org wrote:

 I am trying to loop over a dataset twice.  I am trying using CFLOOP but the 
 2nd CFLOOP will not process.

 cfquery dataset=mydsn name=dset
  select first,last from name
 /cfquery

 //loop through DataSet 1st time
 cfloop query=dset
  
 /cfloop

 //Now I want to loop through the DataSet a 2nd time
 cfloop query=dset
  .
 /cfloop

 How do I get the 2nd cfloop to loop over the DataSet without calling the 
 query ag

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334400
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-08 Thread Dave Hatz

I want to thank you all for the replies.  I went through the code 1 more time 
and found that inside the 1st cfloop, the query variable was getting trashed.  
I should have seen that 1st time around...thank you all, I appreciate your help.

Dave 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334401
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to loop over a dataset twice.

2010-06-08 Thread Maureen

As a matter of course, I name query variables with a q_ prefix.  Then
I am not likely to accidentally overwrite them.

On Tue, Jun 8, 2010 at 8:58 PM, Dave  Hatz daveh...@hatzventures.org wrote:

 I want to thank you all for the replies.  I went through the code 1 more time 
 and found that inside the 1st cfloop, the query variable was getting trashed. 
  I should have seen that 1st time around...thank you all, I appreciate your 
 hel

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334402
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm