linkromain Posted May 23, 2022 Share Posted May 23, 2022 Bonjour, J'ai actuellement une requête SQL qui me permet d'exporter mes produits et déclinaisons, qui est la suivante : SELECT m.name AS manufacturer, p.id_product, pl.name, GROUP_CONCAT(DISTINCT(al.name) SEPARATOR ", ") AS combinations, GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR ",") AS categories, p.price, pa.price, p.id_tax_rules_group, p.wholesale_price, p.reference, pa.ean13, p.supplier_reference, p.id_supplier, p.id_manufacturer, p.upc, p.ecotax, p.weight, s.quantity, pl.description_short, pl.description, pl.meta_title, pl.meta_keywords, pl.meta_description, pl.link_rewrite, pl.available_now, pl.available_later, p.available_for_order, p.date_add, p.show_price, p.online_only, p.condition, p.id_shop_default FROM ps__product p LEFT JOIN ps__product_lang pl ON (p.id_product = pl.id_product) LEFT JOIN ps__manufacturer m ON (p.id_manufacturer = m.id_manufacturer) LEFT JOIN ps__category_product cp ON (p.id_product = cp.id_product) LEFT JOIN ps__category_lang cl ON (cp.id_category = cl.id_category) LEFT JOIN ps__category c ON (cp.id_category = c.id_category) LEFT JOIN ps__stock_available s ON (p.id_product = s.id_product) LEFT JOIN ps__product_tag pt ON (p.id_product = pt.id_product) LEFT JOIN ps__product_attribute pa ON (p.id_product = pa.id_product) LEFT JOIN ps__product_attribute_combination pac ON (pac.id_product_attribute = pa.id_product_attribute) LEFT JOIN ps__attribute_lang al ON (al.id_attribute = pac.id_attribute) WHERE pl.id_lang = 1 AND cl.id_lang = 1 AND p.id_shop_default = 1 AND c.id_shop_default = 1 GROUP BY pac.id_product_attribute Je souhaiterai y ajouter les caractéristiques mais en essayant les tables ps_features, rien n'y fait. Merci de votre aide, si vous pouvez me proposer une solution. Link to comment Share on other sites More sharing options...
Eolia Posted May 23, 2022 Share Posted May 23, 2022 (edited) Désolé on ne peut plus poster de contenu SQL... Edited May 23, 2022 by Eolia (see edit history) Link to comment Share on other sites More sharing options...
linkromain Posted May 23, 2022 Author Share Posted May 23, 2022 Merci de ce retour. Désolé, je n'ai pas vu la règle l'interdisant. Dois-je éditer mon post pour supprimer la requête ? Link to comment Share on other sites More sharing options...
Eolia Posted May 23, 2022 Share Posted May 23, 2022 Non pas de souci mais quand je poste je suis banni pour tentative d'injection SQL, donc je l'ai mis en image 1 Link to comment Share on other sites More sharing options...
linkromain Posted May 23, 2022 Author Share Posted May 23, 2022 C'est bizarre sachant que je n'ai pas eu de blocage de mon coté. Merci tout de même pour cette réponse. Je vais regarder cela et tester. Link to comment Share on other sites More sharing options...
linkromain Posted May 23, 2022 Author Share Posted May 23, 2022 (edited) Ca semble rouler. A tout hasard, est-il possible de séparer les caractéristiques dans des colonnes distinctes ? Edited May 23, 2022 by linkromain (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now