hello, i moved my store to new host. upon doing so i get error messages. its an adult toy store and i wish for you to see error first hand so you can quote price for repair..thank you so much for your very valuable time please go to www.vibrating-voyages.com my icq 455969390
INVALID SQL: 1140 : Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause SQL QUERY FAILURE: SELECT xcart_products.productid, xcart_products.product, xcart_products.productcode, xcart_products.avail, MIN(xcart_pricing.price) AS price, SUM(IF(xcart_classes.classid IS NULL,0,1)) as product_options, IF (xcart_classes.classid IS NULL,'','Y') as is_product_options, IF(xcart_variants.variantid IS NULL,'','Y') as is_variant FROM xcart_products, xcart_categories, xcart_products_categories, xcart_pricing LEFT JOIN xcart_classes ON xcart_classes.productid = xcart_products.productid LEFT JOIN xcart_variants ON xcart_variants.productid = xcart_products.productid AND xcart_variants.avail > 0 WHERE xcart_products.productid=xcart_products_categories.productid AND xcart_products_categories.categoryid=xcart_categories.categoryid AND xcart_products.productid=xcart_pricing.productid AND xcart_pricing.quantity=1 AND (xcart_pricing.membership='' OR xcart_pricing.membership='') AND (xcart_categories.membership='' OR xcart_categories.membership='') AND xcart_products.forsale='Y' AND xcart_products.avail>0 AND xcart_pricing.variantid = 0 AND xcart_products.product_type <> 'C' AND xcart_products.forsale <> 'B' AND xcart_products.sales_stats>0 LIMIT 5
Solution? Add a group by cause: When you use aggregate functions like count, avg, etc... you need to tell SQL to group by the items that Arent in the aggregate functions.