Citation:
1054 - Unknown column 'p.cercle_id' in 'on clause'
select p.products_id, products_nb_max_ordered,products_image2, products_sous_titre , products_nb_bouteilles_caisse ,products_quantity ,products_prix_caviste,cercle_name ,cercle_points , pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_to_categories p2c, products_description pd, featured f left join specials s on (f.products_id = s.products_id and s.status = '1') left join cercle cercle on p.cercle_id = cercle.cercle_id where p.products_status = '1' and f.status = '1' and p.products_id = f.products_id and pd.products_id = f.products_id and pd.language_id = '4' and p2c.products_id=p.products_id and p2c.categories_id = 99 order by rand() DESC limit 1
après des recherche, je pense avoir trouver le bout de code qui pose problème, mais ne comprend pas pourquoi il me génère cette erreur
Citation:
/*Xlabel16*/
if (!isset($_GET['cercle_id'])) $filterlist_cercle_sql= "select distinct cercle.cercle_id as id, cercle.cercle_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CERCLE . " cercle on p.cercle_id = cercle.cercle_id where p.products_status = '1' and p.cercle_id>0 and p.products_id = p2c.products_id ".$FILTER." order by cercle.cercle_name"; else $filterlist_cercle_sql= "select 1";
if (!isset($_GET['manufacturers_id'])) $filterlist_manufacturers_sql= "select distinct manufacturers.manufacturers_id as id, manufacturers.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_MANUFACTURERS . " manufacturers on p.manufacturers_id = manufacturers.manufacturers_id where p.products_status = '1' and p.manufacturers_id>0 and p.products_id = p2c.products_id ".$FILTER." order by manufacturers.manufacturers_name"; else $filterlist_manufacturers_sql= "select 1";
} else {
$filterlist_sql= "select 1";
/*Xlabel6*/
$filterlist_cercle_sql= "select distinct cercle.cercle_id as id, cercle.cercle_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CERCLE . " cercle on p.cercle_id = cercle.cercle_id where cercle.cercle_id >0 and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by cercle.cercle_name";
$filterlist_manufacturers_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id where m.manufacturers_id >0 and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
}