Thanks for the help. However I found another solution which is to use the following SELECT COUNT(ProductsPurchases.ProductID)+Products.Produc tReview as varProductCount, Products.Name, Products.ProductReviewFROM ProductsPurchasesINNER JOIN Products ON Products.ProductID = ProductsPurchases.ProductIDGROUP BY Products.ProductID ORDER BY varProductCount DESC
> Date: Thu, 20 Mar 2008 13:08:51 +0100> From: lists@sebastianmendel.de> CC: mysql@lists.mysql.com> Subject: Re: ORDER BY calculated field> > Neil Tompkins schrieb:> > Thanks Sebastian, but I now get the error message> > > > [MySQL][ODBC 3.51 Driver][mysqld-3.23.58]Invalid use of group function> > iam not familiar with ODBC or MySQL 3.x> > but possible just GROUP BY is missing> check the manual for your mysql version for the exact syntax> > if this is not working at all you have to use HAVING> > -- > Sebastian> > -- > MySQL General Mailing List> For list archives: http://lists.mysql.com/mysql> To unsubscribe: http://lists.mysql.com/mysql?unsub=neildtompkins@hotmail.com>
__________________________________________________ _______________
Share what Santa brought you
https://www.mycooluncool.com