Post by pipoy » Mon Apr 02, 2018 11:17 am

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

Active Member

Posts

Joined
Fri Mar 04, 2016 12:18 pm

Post by thekrotek » Mon Apr 02, 2018 2:50 pm

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.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am

Who is online

Users browsing this forum: julianashcroft and 254 guests