RE: cfloop / cfquery and displaying results

2004-09-07 Thread Cornillon, Matthieu (Consultant)
Keith,

 
Perhaps I am not understanding correctly, but it sounds like a query within
which you group the results is the way to go.

 
You can handle the grouping in a couple of different ways.  I would start by
reading the help on the CFOUTPUT tag, looking at the group parameter.

 
HTH,
Matthieu

-Original Message-
From: Wurst, Keith D. [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 06, 2004 3:28 PM
To: CF-Talk
Subject: cfloop / cfquery and displaying results

hi everyone. i have a question concerning cfloop, cfquery and how to display
information most effectively on a page. here is the situation. i have two
queries. the first query gets all my main topics. the second query gets all
my sub topics. my where clause in my second query uses an IN statement and
utilizes the valuelist of the results of the first query. in the past what i
have done is just performed the first query, and then placed the second
query within a cfloop of the results of the first one to display all the sub
topics. this time around i want to build a result set on the fly without
having to put the second query within my cfloop tag. any suggestions are
greatly appreciated. thanks so much.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cfloop / cfquery and displaying results

2004-09-06 Thread Andrew Dixon
Hi.

You could keep to pretty much the same, but instead of doing a
database query inside the loop speed it up by doing a query of query.
Outside the loop you will need an extra query to get all the data for
the sub-query to use as the query you are going to query, but this
will increase the execution time vastly and will mean only a small
amount of coding changes.

If you need any help with how to do this, then email me over your
original code and I will make the adjustments for you, should only
take a moment.

Andrew.

- Original Message -
From: Wurst, Keith D. <[EMAIL PROTECTED]>
Date: Mon, 6 Sep 2004 15:28:21 -0400
Subject: cfloop / cfquery and displaying results
To: CF-Talk <[EMAIL PROTECTED]>

hi everyone. i have a question concerning cfloop, cfquery and how to
display information most effectively on a page. here is the situation.
i have two queries. the first query gets all my main topics. the
second query gets all my sub topics. my where clause in my second
query uses an IN statement and utilizes the valuelist of the results
of the first query. in the past what i have done is just performed the
first query, and then placed the second query within a cfloop of the
results of the first one to display all the sub topics. this time
around i want to build a result set on the fly without having to put
the second query within my cfloop tag. any suggestions are greatly
appreciated. thanks so much.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]