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
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!
..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.
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
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
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
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
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
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
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
10 matches
Mail list logo