Wrong SQL syntax used. Please go through the SQL syntax. You need to add a JOINING clause using ON
to tell mysql how to link appointment table with users_appointment table. I assume that you have userid column in both tables.
SELECT u FROM Appointment U INNER JOIN Users_appointment
ON u.userid = users_appointment.userid
WHERE u.startDatetime BETWEEN :date1 AND :date2
AND u.ATTENDEES_USER_NAME LIKE :search