hi,
Can anyone give me an SQL query to get all products in specific categories with their manufacturer , pricing and enabled status?
The products and categories are in separated tables. Really dont know how to get the name of the product from specific categories.
I need the Manufacturer | Product Name | Enabled Status are 1 | Price | Category
in 1 SQL query
That's easy, should be something like that:
SELECT m.name, p.title, p.status, c.title FROM product AS p LEFT JOIN manufacturer AS m ON m.product_id = p.product_id LEFT JOIN category AS c ON c.product_id = p.product_id
If you can read SQL language, you will get the main idea. Just check the field names and don't forget to add prefix, if necessary.
SELECT m.name, p.title, p.status, c.title FROM product AS p LEFT JOIN manufacturer AS m ON m.product_id = p.product_id LEFT JOIN category AS c ON c.product_id = p.product_id
If you can read SQL language, you will get the main idea. Just check the field names and don't forget to add prefix, if necessary.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Who is online
Users browsing this forum: julianashcroft and 254 guests