Wellness Classes -

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 'ORDER BY date_starts' at line 10: SELECT s.*, l.*, ci.name AS instructor_name, DATE_FORMAT(date_starts,'%c/%e/%Y') date_starts_f, DATE_FORMAT(date_ends,'%c/%e/%Y') date_ends_f FROM fort_class_sessions s LEFT JOIN fort_class_locations l ON l.class_location_id = s.location_id LEFT JOIN fort_class_instructors ci ON s.instructor_id = ci.instructor_id WHERE s.active = 1 AND canceled = 0 AND close_registration = 0 AND date_ends >= NOW() AND class_id = ORDER BY date_starts