SELECT SQL_CALC_FOUND_ROWS wlp.*, wlp.status as
product_status, wlpm.media, wlpm.media_type,
wlpm.is_default, (SELECT count(review_id) FROM wl_review
WHERE status=1 AND prod_id =wlp.products_id AND rev_type =
'P' ) AS review_count, IF(product_discounted_price = 0,
product_price, product_discounted_price ) as price, ( SELECT
bnd.brand_name FROM wl_brands AS bnd WHERE
wlp.brand_id=bnd.brand_id ) AS brand_name
FROM `wl_products`
as `wlp`
LEFT JOIN `wl_products_media` AS `wlpm` ON
`wlp`.`products_id`=`wlpm`.`products_id`
WHERE
`wlp`.`products_id` = '41991'
AND `wlp`.`status` !=
'2'
GROUP BY `wlp`.`products_id`
ORDER BY
`wlp`.`products_id` DESC
LIMIT 1 KM Bed Works