Guest Posted May 24, 2003 Posted May 24, 2003 Hello, I'm a newbie at SQL, and I try to obtain in one query this information: poducts_name products_model products_description categories_name products_price products_quantity but I can't, anyone can help me.... :cry:
Paulino Posted May 24, 2003 Posted May 24, 2003 Try this: select products_model, products_name, products_description, products_price, categories_name, products_quantity from `osc`.`products` as p, `osc`.`products_description` as pd, `osc`.`products_to_categories` as p2c, `osc`.`categories_description` as c where p.products_id = pd.products_id and pd.language_id = 1 and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id It assumes you only have one language setup and that the product only appears in one category.
Guest Posted May 25, 2003 Posted May 25, 2003 oook... now is working... this is the fnal query 8) select products_model, products_name, products_description, products_price, categories_name, products_quantity from `products` as p, `products_description` as pd, `products_to_categories` as p2c, `categories_description` as c where p.products_id = pd.products_id and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id Thank you very much. :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.