Post the code you are using to output the query.  The information you are
trying to display could make or break this effort.

I'm assuming you have something like this:

<cfoutput query="foo" group="propertyID">
        #propertyID#
        ?????????
        <cfoutput>
                #some info#...
        </cfoutput>
</cfoutput>

and you want to output....say...10 propertyIDs per page?

Without running the SELECT COUNT DISTINCT... you will only be able to use
"next page" and "previous page" links because you won't know how many total
pages there are.



+-----------------------------------------------+
Bryan Love
  Database Analyst
  Macromedia Certified Professional
  Internet Application Developer
TeleCommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis

"Let's Roll"
        - Todd Beamer, Flight 93



-----Original Message-----
From: Jeff [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:08 PM
To: CF-Talk
Subject: Arrrgh...that's not good...Re: Pagination (Next n records) for
an inner join and grouped output...


on 6/12/03 2:34 PM, Bryan Love at [EMAIL PROTECTED] wrote:

> I've run into this one before and it sucks.  Your best bet, if you want
the
> number of unique property ids is to run another query that does a
> SELECT COUNT DISTINCT propertyID AS pCount...
> 
> But whether or not it will work to use this number as the recordcount is
> anyone's guess.  You may have to keep track manually.
> 

You're kidding me...

I had thought about "jury-rigging" it by doing exactly that. But thought I'd
be ashamed of doing something like that...

Am I correct in assuming that the recordcount of the join is actually
correct? It's a fact that I can verify whenever I group them properly (by
grouping them on propertyID) and it always comes out correct. This leads me
to believe that the query is actually *THE* correct way to retrieve this
information in this particular manner...it's just going to be a pain to do a
"next n records" browse type of function?

Is this correct?




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to