-> Classes-> Manufacturer.php
/*
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT p.`id_manufacturer`, COUNT(DISTINCT p.`id_product`) as nb_products
FROM `'._DB_PREFIX_.'product` p USE INDEX (product_manufacturer)
'.Shop::addSqlAssociation('product', 'p').'
LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`)
WHERE p.`id_manufacturer` != 0 AND product_shop.`visibility` NOT IN ("none")
'.($active ? ' AND product_shop.`active` = 1 ' : '').'
'.(Group::isFeatureActive() && $all_group ? '' : ' AND EXISTS (
SELECT 1
FROM `'._DB_PREFIX_.'category_group` cg
LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`)
WHERE p.`id_product` = cp.`id_product` AND cg.`id_group` '.$sql_groups.'
)').'
GROUP BY p.`id_manufacturer`'
);
*/
/* $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT
id_manufacturer
FROM mallasupply.manufacturer;'
);
*/