There is a line from the trigger:
SET NEW.`course` = YEAR(CURRENT_DATE())+1-(substr(NEW.`group_code`, instr(NEW.`group_code`, '-')+1, 2)+2000); So I determine the course of the student. But of course he thinks incorrectly, it’s necessary to count from the first of September, and not from the new year .. The number 16, 17 or 18 is input.
current_date() - interval 9 month. well, or +3 months, but do not add 1 to the year - Mike