I'm jumping into this mid-stream w/o reading through the entire history so
bear w/ me if I'm way out there.
It's a bit of a kludge but I'll often just use a for(init_expr; expr;
post_expr) {} style loop for queries if I need good control of the cursor
over multiple loops. For simplicities sake I'll use CFSCRIPT syntax to
illustrate.
for (i=1; i le outer_query.recordcount; i=i+1) {
for(j=1; j le inner_query.recordcount; j=j+1) {
outer_query.field1[i]; // on way of accesing the element
inner_query[var][j]; // another way
}
}
I'm not fond of how the cursors function (or fails to) w/ anything complex
either. And yes, I too despise silent discarding of empty elements.
As long as we're going for gripes here, valueList() and similar functions
ONLY work w/ queryname.field notation and won't accept any work arounds
inside them. Instead of being able to use queryname[var] when needing
dynamic assignment, you have to use a named var _outside_ the statement and
evaluate the string [evaluate("queryname." & var)] then have that variable
interpolated. It's an evil evil slowdown if you're doing lots of things
dynamically. With the new functions of CF5 this will become an even bigger
issue and I really hope it's better in that ver. (Haven't had much time to
check out the rc)
</rant> :)
-----Original Message-----
From: David E. Crawford [mailto:[EMAIL PROTECTED]]
Sent: May 4, 2001 06:10
To: CF-Talk
Subject: Re: [cold_fusion] Unusual Results, help
I am not apologizing for Allaire, I am stating the facts about the way the
program works. I also feel that a bug is in the eye of the beholder. Just
because it doesn't work the way you a) expect it to or b)like you want it to
doesn't mean it is a bug. This "issue" has been around since the first time
you could have looping constructs (cfloop, cfoutput) nested within each
other. I agree on the empty list elements issue, however.
DC
----- Original Message -----
From: "Aidan Whitehall" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 06:31
Subject: RE: [cold_fusion] Unusual Results, help
> > This has always been the behavior of CF. I can agree that it at first
> > glances appears to be counter intuitive, but at the same
> > time, any reference
> > to queryname.fieldname outside the context of a <CFLOOP> or <CFOUTPUT>
> > results in a reference to the value of the field in the first
> > row of the
> > query. The functionality is such that there is no "inheritance" of
> > references.
>
> Well, I think you're at risk of sounding like an apologist for Allaire.
>
> There are a couple of things that I feel need "fixing" in ColdFusion, and
> this is one of them (the other one that springs to mind is the inability
to
> optionally specify that empty list elements aren't ignored - really useful
> if you are populating database tables from delimited lists).
>
> <CFOUTPUT QUERY="GetParents">
>
> *Crappy CFSET GetParents.ParentID code required here*
>
> <CFOUTPUT QUERY="GetChildren">
>
> #GetParents.ParentID# doesn't increment properly with each
> iteration of the outer loop.... WHY NOT ALLAIRE?!?!
>
> </CFOUTPUT>
> </CFOUTPUT>
>
>
> > Since CF5 is feature complete and in RC testing, I would
> > seriously doubt
> > that a change in behavior is going to happen in this release,
> > or for that
> > matter even in NEO.
>
> Unfortunately, I think you might be right.
>
> "Hey, we've fixed a load of old bugs!" doesn't sound as good to new
> customers as "Hey, there's a load of new features!".
>
>
>
> --
> Aidan Whitehall <[EMAIL PROTECTED]>
> Netshopperuk
> Telephone +44 (01744) 648650
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists