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 = "amalfi coast" OR D.city ="amalfi" OR D.city ="atrani" OR D.city ="cetara" OR D.city ="conca dei marini" OR D.city ="maiori" OR D.city ="positano" OR D.city ="praiano" OR D.city ="ravello" OR D.city ="scala" OR D.city ="tramonti" OR D.city ="vietri sul mare" ) and D.status='Active' group by D.Ident order by rate desc LIMIT -50,50