PROTECTED]
Sent: Thursday, December 15, 2005 4:18 PM
To: CF-Talk
Subject: Re: cfloop vs cfoutput query - best practice
That's not possible.
What if you want to group on a column? Cfloop can't do that, only
cfoutput.
How do you get around that limitation? Because I would maim to be able to
use
: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 15, 2005 4:18 PM
To: CF-Talk
Subject: Re: cfloop vs cfoutput query - best practice
That's not possible.
What if you want to group on a column? Cfloop can't do that, only
cfoutput.
How do you get around that limitation? Because I
, 2005 8:24 AM
To: CF-Talk
Subject: RE: cfloop vs cfoutput query - best practice
Well you can, but you wouldn't want to. Just do the logic yourself by seeing
if the grouping column has changed, if it has, you've moved onto the next
group.
Ade
-Original Message-
From: Andy Matthews [mailto
Well that's okay then. But I was HOPING you'd tell me you had a way to group
using cfloop darnit!
Well you can do it...but it's not that efficientrole your own code that
keeps track of the LAST loops value of the field you want to group onwhen
LAST value is not equal to current value
First, thanks to all who communicate via cf_talk. I have learned alot about
my trade from all of the contributors. While its a rare occurance, when I
am able to provide insight regarding someone's inquiry, I do so.
My question is, if I need to loop thru a query result set and will be not
Ben Forta ran some tests on this one a while back, and I think it came out
pretty even.
You can probably google it and find his results.
Will
~|
Logware (www.logware.us): a new and convenient web-based time tracking
Here it is:
http://coldfusion.sys-con.com/read/41568.htm
Will
~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message:
I prefer CFLOOP for all my query looping needs (even when I'm
outputting) assuming I don't need the grouping provided by CFOUTPUT.
I don't know if it's more efficient, but I think it makes the code
easier to read.
cheers,
barneyb
On 12/15/05, Charlie Hanlon [EMAIL PROTECTED] wrote:
First,
IIRC, it doesn't matter anymore in terms of speed with CF6+
As a matter of personal preference, if there's no output I use a loop.
If there *is* output and I am using a loop I make sure I put the
cfoutputs outside the loop, but again I don't believe that makes any
difference unless you are on CF
used to matternot anymore...if ya want the technical details I can fill
them
in for you...I use CFLOOP exclusively
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL
x737
--//-
-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 15, 2005 3:59 PM
To: CF-Talk
Subject: Re: cfloop vs cfoutput query - best practice
used to matternot anymore...if ya want the technical details I can fill
them
That's not possible.
What if you want to group on a column? Cfloop can't do that, only cfoutput.
How do you get around that limitation? Because I would maim to be able to
use group with cfloop.
Well yes it is possible if you never (at least not in about 5 years) use the
grouping ability of
in this
case.
You could just turn on debugging and compare the execution times of both.
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Charlie Hanlon [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 15, 2005 4:20 PM
To: CF-Talk
Subject: cfloop
, 2005 5:55 AM
To: CF-Talk
Subject: Re: cfloop vs cfoutput mx 6.1 / 7
Can anyone tell me if there is a performance difference in the
following 2 bits of code? I know back in 4.5 cfloop was worse than
cfoutput but now? Any web references to tests on these things welcome!
This is Forta
Can anyone tell me if there is a performance difference in the
following 2 bits of code? I know back in 4.5 cfloop was worse than
cfoutput but now? Any web references to tests on these things welcome!
This is Forta on the subject. It's pre 6.1/7, but I'll bet it's the same.
* from Products
order by Family
/cfquery
cfoutput
cfloop query=getProducts
A HREF=#getProducts.URL#
target=_blankb#getProducts.ProductName#/b/a
/cfloop
/cfoutput
// using cfoutput for the quey output //
cfquery name=getProducts
select * from Products
order by Family
/cfquery
Plane, Nathaniel wrote:
Eek, what about cfoutput group=? You wouldn't be able to group result
sets in this case.
Just use a conditional loop which is not over the query as a query, but
over the query as a structure of arrays. Have to do that anyway if you
want to jump back and forth between
I know that the prevailing wisdom is that CFOUTPUT with the Query attribute
is faster than CFLOOPing over a query. However, in Forta's CF 5
Certification Study Guide, he states that CFLOOP performs better (p. 37 and
374). Has CF 5 improved the performance of CFLOOP (Steve Drcuker referred to
it
I know that the prevailing wisdom is that CFOUTPUT with the Query attribute
is faster than CFLOOPing over a query. However, in Forta's CF 5
Certification Study Guide, he states that CFLOOP performs better (p. 37 and
374). Has CF 5 improved the performance of CFLOOP (Steve Drcuker referred
to
it
I agree with everything that Dave says... (Having just deleted all the
stuff I typed cos it was a repeat)
Only to add that
eliminating unnecessary whitespace is important to me. But you will find
that there are some people who swear by using CFOUTPUT QUERY=. When it
comes to grouping
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder Director
www.cfug-vancouverisland.com
- Original Message -
From: Park, Simon [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 7:13 AM
Subject: CFLOOP
Yup. CFLOOP no longer sucks. Thank god.
- Original Message -
From: Park, Simon [EMAIL PROTECTED]
Date: Friday, March 8, 2002 8:13 am
Subject: CFLOOP and CFOUTPUT
I know that the prevailing wisdom is that CFOUTPUT with the Query
attributeis faster than CFLOOPing over a query
: Friday, March 08, 2002 10:12 AM
Subject: Re: CFLOOP and CFOUTPUT
Yup. CFLOOP no longer sucks. Thank god.
- Original Message -
From: Park, Simon [EMAIL PROTECTED]
Date: Friday, March 8, 2002 8:13 am
Subject: CFLOOP and CFOUTPUT
I know that the prevailing wisdom is that CFOUTPUT
Correct, when first introduced CFLOOP was s-l-o-w, but nowadays you'll
actually find that it outperforms CFOUTPUT.
--- Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 11:12 AM
To: CF-Talk
Subject: Re: CFLOOP and CFOUTPUT
Yup
: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 10:54 AM
To: CF-Talk
Subject: Re: CFLOOP and CFOUTPUT
This one came through the list abouyt a month ago, so you may want to check
the archives.
The basic result was that CFLOOP is the way to go.
Personally I wrap my entire
-Talk
Subject: RE: CFLOOP and CFOUTPUT
Correct, when first introduced CFLOOP was s-l-o-w, but nowadays you'll
actually find that it outperforms CFOUTPUT.
--- Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 11:12 AM
To: CF-Talk
From: Plane, Nathaniel [mailto:[EMAIL PROTECTED]]
--
Eek, what about cfoutput group=? And what about page includes, those
would be out of the question (including a page with another cfoutput
without a group parameter would throw an error). This coding method has
quite a few consequences
with a query attribute IS easier to use if it suits your needs)
~Simon
--
Personally, use what you like. I have not found any measurable difference in
performance between CFOUTPUT and CFLOOP.
If performance becomes an issue, try to resolve
Sorry for the crosspost (had conflicting answers from other lists)
but is there a consensus on which method of looping over a query
is fastest?
cfloop or cfoutput..
OK, I know you've posted a Winner post, but here's the reasoning behind
why CFOutput is slower than CFLoop
When you run
Thanks for clearing that up for me
KOla
-Original Message-
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 12:03
To: CF-Talk
Subject: RE: cfloop vs cfoutput
Sorry for the crosspost (had conflicting answers from other lists)
but is there a consensus on which
Sorry for the crosspost (had conflicting answers from other lists)
but is there a consensus on which method of looping over a query is fastest?
cfloop or cfoutput..
Cheers
KOLa
~~
Structure your ColdFusion code with Fusebox. Get the official
ofcourse cfoutput,
that's why it doesn't allow alot of tags to be typed into it.
it's much more faster then CFLOOP, which lets you specify every cf tag you
want (CFMAIL, for example)
Thanks,
Michael Lugassy
IT/WEB Specialist
Interactive Music Ltd.
No question on that one, CFOUTPUT beats CFLOOP by a long shot, however
sometimes you have to use CFLOOP for things, like if you wish to have a
CFQUERY tag in your CFOUTPUT statement which wouldn't be possible, you'd
have to use CFLOOP
Gregory Harris
Web Developer
The Stirling
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 12:33 PM
To: CF-Talk
Subject: Re: cfloop vs cfoutput
No question on that one, CFOUTPUT beats CFLOOP by a long shot, however
sometimes you have to use CFLOOP for things, like if you wish to have a
CFQUERY tag in your CFOUTPUT statement which
: Gregory Harris [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 17:33
To: CF-Talk
Subject: Re: cfloop vs cfoutput
No question on that one, CFOUTPUT beats CFLOOP by a long shot, however
sometimes you have to use CFLOOP for things, like if you wish to have a
CFQUERY tag in your CFOUTPUT statement which
by this.
- Original Message -
From: Michael Lugassy [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 12:22 PM
Subject: Re: cfloop vs cfoutput
ofcourse cfoutput,
that's why it doesn't allow alot of tags to be typed into it.
it's much more faster then CFLOOP, which
,
Critter
---
Wednesday, May 09, 2001, 11:50:56 S2k, you wrote:
KO Sorry for the crosspost (had conflicting answers from other lists)
KO but is there a consensus on which method of looping over a query is fastest?
KO cfloop or cfoutput..
KO Cheers
KO KOLa
: (949) 707-1534 FAX: (949) 707-1535
- Original Message -
From: Adkins, Randy [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 10:08 AM
Subject: RE: cfloop vs cfoutput
You can have a CFQUERY tag between
CFOUTPUT/CFOUTPUT Tags
I have done that many times
- Original Message -
From: Critter [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 1:37 PM
Subject: Re: cfloop vs cfoutput
Hello Kola,
This is from the Certified ColdFusion Developer Study Guide:
pg 37 Tip #1
crit_quote
The function of the query loop is the same
I think that has made it into Hals Helms worst practices list. Learn to use
SQL joins and this is never necessary.
jon
- Original Message -
From: Adkins, Randy [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 1:08 PM
Subject: RE: cfloop vs cfoutput
You can
40 matches
Mail list logo