This is, in fact, an issue with MySQL 5. Seems to be more picky with the placement of LEFT JOIN. It appears to assume the LEFT JOIN should be made from the table listed right before the LEFT JOIN command. To fix the problem, I moved products p to be right before the LEFT JOIN for the first query and did a few other rearrangements for the second query.
Open includes/modules/featured_sets.php
Around line 68, find the following code:
$featured_manufacturer_products_query_raw = "select p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.manufacturer_featured_until, mi.manufacturers_id, mi.languages_id, mi.manufacturers_url from "
. TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' and m.manufacturer_featured = '1' order by " . FEATURED_MANUFACTURER_SORT_ORDER . " " . FEATURED_MANUFACTURER_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_MANUFACTURER;
I replaced those two lines with one line:
$featured_manufacturer_products_query_raw = "select p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.pro ducts_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as f inal_price, m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.manufacturer_featured_until, mi.manufacturers_id, mi.languages_id, mi.manufacturers_url from " . TAB LE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m. manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' and m.manufacturer_featured = '1' order by " . FEATURED_MANUFACTURER_SORT_ORDER . " " . FEATURED_MANUFACTURER_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_MANUFACTURER
Around line 98, find the following two lines of code:
$featured_categories_query_raw = "select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_featured_until, p.products_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES
. " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_CATEGORIES;
Replace those two lines with the following line:
$featured_categories_query_raw = "select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_featured_until, p.products_id, p.products_price, p.prod ucts_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price , IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIP TION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TA BLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (in t)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_CATEGORIES;
That fixed the errors for me.