Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- COUNT(p.id) as total_count
- FROM
- zoomall_products p
- INNER JOIN zoomall_products_items i
- ON (p.id = i.product_id AND i.status = 'active' AND (i.price_new > 0 OR i.price_old > 0))
- INNER JOIN zoomall_products_translations pt
- ON (p.id = pt.product_id AND pt.status = 'active')
- INNER JOIN zoomall_products_categories_links c
- ON (p.id = c.product_id)
- INNER JOIN zoomall_products_categories cc
- ON (c.category_id = cc.id AND cc.status = 'active')
- WHERE
- p.status = 'active' AND c.category_id = 222
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement