The error is due to running SQL 5. The From statement now needs to inclose the tables.
Code:
FROM
categories c,
categories_description cd,
products p,
products_description pd,
products_to_categories pc
needs to be:
Code:
FROM
(categories c,
categories_description cd,
products p,
products_description pd,
products_to_categories pc)
corrected sql statement in froogle.php ->
Code:
$sql = "
SELECT concat( '" . $productURLstart . $productURLend . "' ,p.products_id) AS product_url,
p.products_model AS prodModel,
p.manufacturers_id,
p.products_weight,
p.products_type,
m.manufacturers_name AS mfgName,
m.manufacturers_id,
p.products_id AS id,
pd.products_name AS name,
pd.products_description AS description,
p.products_status AS prodStatus,
FORMAT( IFNULL(s.specials_new_products_price, p.products_price),2) AS price,
p.products_image AS image_url,
pc.categories_id AS prodCatID,
c.parent_id AS catParentID,
cd.categories_name AS catName
FROM (" . TABLE_CATEGORIES . " c,
" . TABLE_CATEGORIES_DESCRIPTION . " cd,
" . TABLE_PRODUCTS . " p,
" . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_PRODUCTS_TO_CATEGORIES . " pc)
left join " . TABLE_MANUFACTURERS . " m on ( m.manufacturers_id = p.manufacturers_id )
left join " . TABLE_SPECIALS . " s on ( s.products_id = pc.products_id AND ( (s.expires_date > CURRENT_DATE) OR ($
left join " . TABLE_PRODUCT_TYPES . " pt on ( p.products_type = pt.type_id )
WHERE p.products_price > 0
AND p.products_id=pd.products_id
AND p.products_id=pc.products_id
AND pc.categories_id=c.categories_id
AND c.categories_id=cd.categories_id
ORDER BY
p.products_id ASC
";