"INNER tbl_020articleDetails b" should be:
"INNER JOIN tbl_020articleDetails b" -----Original Message----- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 28 September 2005 22:30 To: CF-Talk Subject: Re: Order by number of articles (count?) Hi Andy, I tried this option out but it was coming up with an error saying that the query doesn't have a GROUP AS statement. i then tried going back to your code from yesterday when i was getting help on the actual cfquery but still couldn't manage to get it to work. At the moment i have it as: <cfquery name="GetAuthors" datasource="user020"> SELECT a.authorID, a.authorPhotograph, a.authorFirstName, a.authorSurname, a.authorAboutMe, b.articleID, b.authorID, b.articleTitle, a.articleDatePublishedLast FROM tbl_020authorDetails a INNER tbl_020articleDetails b WHERE authorPhotograph <> ' ' AND a.authorID = a.authorID AND b.articleAuthenticated = 1 AND b.articleSubTypeID <> 55 AND b.articleSubTypeID <> 68 </cfquery> The error i am getting is: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]'tbl_020articleDetails' is not a recognized join option. Any help would be great, Thanks. On 28 Sep 2005, at 21:13, Andy Matthews wrote: > The Count function goes in the SELECT portion of your statement. > > SELECT COUNT(tbl_020articleDetails.articleID) AS totalArticles > > <!----------------//------ > andy matthews > web developer > ICGLink, Inc. > [EMAIL PROTECTED] > 615.370.1530 x737 > --------------//---------> > > -----Original Message----- > From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 28, 2005 2:34 PM > To: CF-Talk > Subject: Order by number of articles (count?) > > > Hi guys, > > I'm trying to work out how to order my query by the amount of > articles. > > <cfquery name="GetAuthors" datasource="user020"> > SELECT tbl_020authorDetails.authorID, > authorPhotograph, authorFirstName, authorSurname, authorAboutMe, > tbl_020articleDetails.articleID, tbl_020articleDetails.authorID, > articleTitle, articleDatePublishedLast > FROM tbl_020authorDetails, tbl_020articleDetails > WHERE authorPhotograph <> ' ' AND > tbl_020articleDetails.authorID = tbl_020authorDetails.authorID AND > tbl_020articleDetails.articleAuthenticated = 1 AND > tbl_020articleDetails.articleSubTypeID <> 55 AND > tbl_020articleDetails.articleSubTypeID <> 68 > ORDER BY tbl_020authorDetails.authorFirstName, > articleDatePublishedLast DESC > </cfquery> > > How do I count how many articles there are, ie something like ORDER > BY tbl_020articleDetails.articleID(Count as) or something? > > Thanks for any help, > > Saturday > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219528 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

