ruisonika Posted July 13, 2017 Share Posted July 13, 2017 Hello anyone, i need urgent help if you please.In my ps_product i have added one field compatible_prod that means that each id_product has a number like in the image example.So I want to show all id_product that have the same compatible_prod value of the current id_product.Something like this (my problem is that i don't know how to write this function in product.php)public function getCompatible($id_product){ //to know what is the value of compatible_prod of the current id $product_compatible = SELECT 'compatible_prod' FROM 'ps_product' WHERE 'id_product' = $this->id AND 'active' = 1 //select all compatible products $all_prod_compatibles = SELECT * FROM 'ps_product' WHERE 'compatible_prod = $product_compatible } I don't know...could anybody help me?many many thanks 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