How to add entries in a table column as the attributes for another table in MySQL?
You should have a table something like this:

CREATE TABLE Attendance (
    class_id ... NOT NULL,
    student_id ... NOT NULL,
    date DATE NOT NULL,
    PRIMARY KEY(class_id, student_id, date)
) ENGINE=InnoDB;


The existence of a row says that a particular student was in a particular class for the particular day.

This is perhaps the cleanest way to store the data.  Remember:  A database is a repository for data, not a reflection of reports you might like to present.  Reports are derived from raw data.

Note that the table is not limited by the number of classes, students, or dates.

This, for example, reports how many students were in each class for each day:

SELECT class_id, date, COUNT(*)  FROM Attendance  GROUP BY class_id, date;


If you want to turn that into a 2D matrix, see the [pivot] tag.  (It's a bit tricky.