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 'alehu' and b.clinic_id = a.clinic_id and b.service_id = '51' ord' at line 2