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 'AND screening_time > ORDER BY screening_time ASC LIMIT 0, 1' at line 1
SELECT screening_time, film_id FROM films_screenings WHERE film_id <> AND screening_time > ORDER BY screening_time ASC LIMIT 0, 1;