MrBaseball34 Posted July 12, 2010 Share Posted July 12, 2010 I'm developing some code to create a file for another process of ours and was wondering if anyone could help out on this SQL. SELECT ps_product_lang.description_short AS description, ps_product.id_product AS prod_id, ps_product.quantity AS quantity, ps_product.price AS price, ps_product.wholesale_price AS wholesale_price, ps_manufacturer.name AS manufacturer, ps_category_lang.name as category, ps_supplier.name as supplier FROM ps_product LEFT JOIN ps_product_lang ON ps_product_lang.id_product = ps_product.id_product AND ps_product_lang.id_lang = 1 -- use lang variable here LEFT JOIN ps_manufacturer ON ps_manufacturer.id_manufacturer = ps_product.id_manufacturer LEFT JOIN ps_category_product ON ps_category_product.id_product = ps_product.id_product LEFT JOIN ps_category_lang ON ps_category_lang.id_category = ps_category_product.id_category AND ps_category_lang.id_lang = 1 -- use lang variable here LEFT JOIN ps_supplier ON ps_supplier.id_supplier = ps_product.id_supplier ORDER BY ps_product.id_product I need to know how to work in the sub-categories. Link to comment Share on other sites More sharing options...
tomerg3 Posted July 15, 2010 Share Posted July 15, 2010 Need more information....What exactly are you trying to do and what subcategories are you trying to get? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 15, 2010 Author Share Posted July 15, 2010 Isn't it obvious from the SQL what I'm trying to do? I need the subcategory for the product. I already have the category but not sure how to get the subcategory. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 19, 2010 Author Share Posted July 19, 2010 Anyone else??? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 28, 2010 Author Share Posted July 28, 2010 Can anyone help out here? 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