Jump to content

database - join table and show rezult


Recommended Posts

hello

(P_ - prestashop_)

I have porblem with join table.
I want join p_product with p_features and p_features_lang and p_features_value_lang.

i make:

SELECT p.id_product,pl.name AS p_name, pl.link_rewrite, fp.id_feature_value AS f_name, fl.name AS fl_name
FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product)
INNER JOIN '._DB_PREFIX_.'feature_product fp ON (p.id_product = fp.id_product)
INNER JOIN '._DB_PREFIX_.'feature_lang fl ON (fp.id_feature = fl.id_feature)



here is all ok but i want some like that

fl.name = fvl.value ( for all feature what i create, where fvl is p_feature_value_lang)

for example:
name product: cap
feature:
size = 10
height = 20
sezon = winter
...

please help ;)

Link to comment
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...