Advertisement
Guest User

Untitled

a guest
Jan 24th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.52 KB | None | 0 0
  1. SELECT
  2.     COUNT(p.id) as total_count
  3. FROM
  4.     zoomall_products p
  5. INNER JOIN zoomall_products_items i
  6.     ON (p.id = i.product_id AND i.status = 'active' AND (i.price_new > 0 OR i.price_old > 0))
  7. INNER JOIN zoomall_products_translations pt
  8.     ON (p.id = pt.product_id AND pt.status = 'active')
  9. INNER JOIN zoomall_products_categories_links c
  10.     ON (p.id = c.product_id)
  11. INNER JOIN zoomall_products_categories cc
  12.     ON (c.category_id = cc.id AND cc.status = 'active')
  13. WHERE
  14.     p.status = 'active' AND c.category_id = 222
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement