Jump to content

Recommended Posts

Bonjour,

J'ai une petite requête SQL qui fonctionne bien dans phpMyAdmin.

SELECT
	ps_product.id_product AS ID,
	ps_product_lang.name AS Nom,
	ps_supplier.name AS Fournisseur
FROM
	ps_product
INNER JOIN
	ps_product_lang
ON
	ps_product.id_product = ps_product_lang.id_product
INNER JOIN
	ps_supplier
ON
	ps_product.id_supplier = ps_supplier.id_supplier


Je mets la requête dans le gestionnaire SQL de Prestashop et j'ai l'erreur :

L'attribute "id_productINNER" n'existe pas dans la table "qerf_product_lang".

 

Prestashop n'accepte qu'une seule jointure ?
Une idée ?

Merci 😰

Share this post


Link to post
Share on other sites

Mettez des parenthèses et des espaces, c'est préférable.

Celle-ci fonctionne

SELECT p.id_product AS ID, pl.name AS Nom, ps.name AS Fournisseur
FROM ps_product p
INNER JOIN ps_product_lang pl ON (p.id_product = pl.id_product)
INNER JOIN ps_supplier ps ON (ps.id_supplier = p.id_supplier)

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More