SELECT p.id,p.category_id,p.brand_id,p.image,p.image2,p.rating,pd.name,pd.short_description,pd.description,pd.tags,pd.url,pc.price,pc.discount,pc.discount_type,pc.start_date,pc.end_date,pc.quantity,(SELECT COUNT(pr.id) FROM product_reviews pr WHERE pr.is_approved = 1 AND p.id = pr.product_id) AS totalReviews FROM products p LEFT JOIN product_details pd ON p.id = pd.product_id LEFT JOIN product_prices pc ON p.id = pc.product_id WHERE p.id = ? AND p.status = ? AND pd.language_id = ? ORDER BY p.sort_order DESC, p.id DESC
Array
(
    [0] => 29
    [1] => enabled
    [2] => 1
)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pr.is_approved' in 'where clause'