CREATE TABLE table_name_40 (opponent VARCHAR(255), record VARCHAR(255))
Who was the opponent when the record was 31-24?
    
SQL: SELECT opponent FROM table_name_40 WHERE record = "31-24"