SELECT p.manufacturer, m.name, m.logo_url, p.name, p.subheading, i.base_filename, i.caption, i.name, p.sale_price_ex_vat, p.sale_price_inc_vat, p.description, p.despatch_days, p.reward_points, p.stock_due_date, p.product_weight, p.techspecs, p.package_price, p.meta_keywords, p.meta_description, p.title_tag, p.instore_demo, p.supplier_SKU, !ISNULL(sale.category) as sale_item FROM products p LEFT JOIN manufacturers m ON p.manufacturer = m.id LEFT JOIN images i ON p.primary_image = i.id LEFT JOIN product_category sale ON p.id = sale.product AND sale.category = 564 WHERE p.id = LIMIT 1