I'm managed to do the GROUP BY stuff and it's not throwing any errors  
but when I add the COUNT() in the order it isn't doing anything:

<cfquery name="GetAuthors" datasource="user020">
     SELECT
     tbl_020authorDetails.authorID,
     tbl_020authorDetails.authorFirstName,
     tbl_020authorDetails.authorSurname,
     tbl_020authorDetails.authorPhotograph,
     tbl_020authorDetails.authorAboutMe,
     tbl_020articleDetails.articleID,
     tbl_020articleDetails.articleTitle
     FROM tbl_020articleDetails
     INNER JOIN tbl_020authorDetails ON  
tbl_020articleDetails.authorID = tbl_020authorDetails.authorID
     WHERE tbl_020articleDetails.articleAuthenticated = 1 AND  
tbl_020authorDetails.authorPhotograph <> ''
     GROUP BY
     tbl_020authorDetails.authorID,
     tbl_020authorDetails.authorFirstName,
     tbl_020authorDetails.authorSurname,
     tbl_020authorDetails.authorPhotograph,
     tbl_020authorDetails.authorAboutMe,
     tbl_020articleDetails.articleID,
     tbl_020articleDetails.articleTitle
     ORDER BY tbl_020authorDetails.authorID, COUNT 
(tbl_020articleDetails.articleID) DESC
</cfquery>

<cfoutput query="GetAuthors" group="authorID">
<p><strong>#authorFirstName#</strong></p>

<p>my articles:</p>
<cfoutput>#articleTitle#<br /></cfoutput>
</cfoutput>

Any ideas why not?  It doesn't make any changes whatsoever.  The  
ORDER BY, is that just ordering the main query, what in this case as  
i just want to order the JOIN (tbl_020articleDetails)?

Thanks,

Stuart



On 29 Sep 2005, at 13:38, Taco Fleur wrote:

> You can use it in the order by clause, he just needs to group all the
> columns in his query with GROUP BY.
>
>
> Taco Fleur - Pacific Fox
> an industry leader with commercial IT experience since 1994 .
> http://www.pacificfox.com - Web Design and Development
>
>
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219608
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to