SELECT p.id, p.code, p.parent_id, pc.id AS productcategoryid, IF(p.name1 = '' OR p.name1 IS NULL, p.name1, p.name1) as name, IF(p.keywords1 = '' OR p.keywords1 IS NULL, p.keywords1, p.keywords1) as keywords, IF(p.description1 = '' OR p.description1 IS NULL, p.description1, p.description1) as description, p.pic, p.price, p.rebate, p.publishyear, p.isbn, p.label_id, p.manufacturer_id, p.publisher_id, l.name AS labelname, m.name1 AS manufacturername, pu.name AS publishername FROM shopproduct p INNER JOIN manufacturer m ON p.manufacturer_id = m.id INNER JOIN shopproductcategory pc ON p.id = pc.product_id LEFT OUTER JOIN publisher pu ON p.publisher_id = pu.id LEFT OUTER JOIN label l ON p.label_id = l.id WHERE p.id = '631' AND p.status = 1

Unknown column 'l.name' in 'field list'