On 9/3/2018 at 9:45 AM, Binded said:Me or other any developer in here could easily solve your problem, but I think it would be much more valuable to give you a hint: You have an error in the sql query. My original query works with 1.6.1.4, you can use it as a reference.
$query = 'SELECT `id_image` FROM `p_product_attribute_combination` INNER JOIN `p_product_attribute` ON p_product_attribute.id_product_attribute = p_product_attribute_combination.id_product_attribute INNER JOIN `p_product_attribute_image` ON p_product_attribute_image.id_product_attribute = p_product_attribute.id_product_attribute WHERE `id_attribute` = \''.$id_attribute.'\' AND `id_product` = \''.$id_product.'\''; return DB::getInstance()->getValue($query);
Whats wrong with it
edit: I even tried the original statement again no luck:
$query = 'SELECT `id_image` FROM `p_product_attribute_combination` INNER JOIN `p_product_attribute` ON `p_product_attribute`.`id_product_attribute` = `p_product_attribute_combination`.`id_product_attribute` INNER JOIN `p_product_attribute_image` ON `p_product_attribute_image`.`id_product_attribute` = `p_product_attribute`.`id_product_attribute` WHERE `id_attribute` LIKE \''.$id_attribute.'\' AND `id_product` = \''.$id_product.'\''; return DB::getInstance()->getValue($query);