(Qualifying Position) Race Finish Position
Best 8 races are counted towards points. Red indicates the race was dropped.
* indicates that no points were earned.
Points are awarded for places 1-20 as follows: 25, 21, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
Weekend and Finish count only applies to this conference
getTotalPositions function:

SELECT position_in_class FROM race_results JOIN conference_x_event ON race_results.event_key = conference_x_event.event_key WHERE class_key = AND position_in_class != 'DQ' AND position_in_class != 'DNS' AND position_in_class != 'DNF' AND conference_x_event.conference_key = 3 ORDER BY LENGTH(position_in_class) DESC, position_in_class DESC

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 position_in_class != 'DQ' AND position_in_class != 'DNS' AND position_in_cla' at line 5