A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'group by prd.fld_product_sku ORDER BY prd.fld_order_id ASC' at line 1

SELECT prd.*,min(prd.fld_product_price) as fld_min_price,brd.fld_brand_name FROM tbl_product prd inner join tbl_brand brd on brd.fld_brand_id=prd.fld_brand_id inner join tbl_product_attribute attr on attr.fld_product_id=prd.fld_product_id where attr.fld_product_qty!=0 && prd.fld_product_status=1 and prd.fld_rcat_id= group by prd.fld_product_sku ORDER BY prd.fld_order_id ASC

Filename: /home/hospimedicaintl/public_html/models/mproduct.php

Line Number: 5180