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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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