Have I copied a TIMESTAMP or text?

When we have an outbreak of COVID, my school will tell us to do online classes, like the first 7 weeks of this term.

I have a PDO login system which records who logged in when. If they come late, they get marked absent.

Students often tell me, “But I logged on on time!”

Up to now the TIMESTAMP in the column logon_time is overwritten each time the student logs in.

I want to save all the logon times for each student for each week (19 weeks in total), in case they have a complaint.

I have a table logon_times_20BECW and this query:

UPDATE logon_times_20BECW, allstudents20BE1 SET logon_times_20BECW.Week1 = allstudents20BE1.logon_time WHERE logon_times_20BECW.studentnr = 2025010101

I’m just not sure if I am copying a TIMESTAMP over, or text. I want text, so it won’t change if the table gets updated.

The column logon_times_20BECW.Week1 is declared as VARCHAR(255)

I’m pretty sure I have text in logon_times_20BECW, but not 100% sure.

Initial login/submit date should be used ONLY in the initial creating of the record/entry.

During UPDATES, you should only update the other ‘week/timestamp’ fields…

Sponsor our Newsletter | Privacy Policy | Terms of Service