The official site for Lavera, True Natural & Benecos Organic Cosmetics & Skincare
Shopping Cart $0.00

You have no items in your shopping cart.

SELECT `main_table`.*, COUNT(IF(comments_table.status = 2,comments_table.post_id, NULL)) AS `comment_count` FROM `aw_blog` AS `main_table` LEFT JOIN `aw_blog_store` AS `store_table` ON main_table.post_id = store_table.post_id LEFT JOIN `aw_blog_comment` AS `comments_table` ON main_table.post_id = comments_table.post_id INNER JOIN `aw_blog_post_cat` AS `cat_table` ON main_table.post_id = cat_table.post_id WHERE (main_table.created_time<='2014-09-20 16:11:21') AND (main_table.status = 1) AND (store_table.store_id in (0, '1')) AND (cat_table.cat_id = '7') GROUP BY `main_table`.`post_id` ORDER BY main_table.created_time DESC LIMIT 10