Looking for a Php+SQL expert. Payment.

Discussion in 'PHP' started by KeyboardHustler, Mar 8, 2007.

  1. #1
    Hello,

    Im having some problems with my online store. I recently moved my site to a new dns and recived some wierd problems. About a missing collumn in my SQL but it's there. I've had an programmer look at the problem but he had not a clue because its not gone. Are you the right person to help me.

    Please add me at ICQ - 455969390


    It will be rewarding.

    Here is the error
    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
    Code (markup):

     
    KeyboardHustler, Mar 8, 2007 IP
  2. chuckd1356

    chuckd1356 Active Member

    Messages:
    770
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    70
    #2
    This is the wrong forum. This should be in the business category.
     
    chuckd1356, Mar 8, 2007 IP
  3. spachev

    spachev Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think if you add GROUP BY 1 to the query it should fix it.
     
    spachev, Mar 8, 2007 IP
  4. KeyboardHustler

    KeyboardHustler Well-Known Member

    Messages:
    1,087
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Why don't you help instead of complaining? Because you CAN'T

    Please do not post here again.
     
    KeyboardHustler, Mar 8, 2007 IP