You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-50,50' at line 1
CHECK THE URL =>
select D.*,sum(R.reviewrating) as reviewrate,count(R.businessid) as reviewcnt,R.review,round(sum(R.reviewrating)/count(R.businessid)) as rate from tbl_data D left join tbl_reviews R on (D.Ident = R.businessid AND R.status = 'Active') where D.category='hotels & hostels' and (D.city ='naples' ) and D.status='Active' group by D.Ident order by rate desc LIMIT -50,50