更新时间:2022-11-08 19:23:39
The problem is with the quotes (on PC it is located around Enter key). You have used them instead of backticks (on PC it is located under Esc key).
ALTER TABLE `project_course`.`attendance`
ADD CONSTRAINT `FK_Student`
FOREIGN KEY (`idStudent`) # Change them here around `idStudent`
REFERENCES `project_course`.`student` (`userid`) # and here around `userid`
ON DELETE NO ACTION
ON UPDATE NO ACTION;