Hi all, Have a query that used to work on one server but then MYSQL version was upgraded and now it no longer works. Here's the query:
SELECT *, SUM(quantity)*100/ AS percentage FROM CartTable WHERE company ='1' AND submitted='1' AND dateinserted>='946702800' AND dateinserted<='1085247047' AND product_index='148' GROUP BY product_index,colour,size ORDER BY percentage DESC LIMIT 1 This is the error I get: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS percentage FROM CartTable WHERE company ='1' AND submitted=' Any clue why this would no longer work? Thanks! Aaron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]