User 'sklepkam_kami' has exceeded the 'max_questions' resource (current value: 1485)

		SELECT IF(COUNT(id_product_attribute), SUM(pa.`quantity`), p.`quantity`) as total
		FROM `ps_product` p
		LEFT JOIN `ps_product_attribute` AS pa ON pa.`id_product` = p.`id_product`
		WHERE p.`id_product` = 6136
		
		GROUP BY p.`id_product`