How to add "created at" column in table

I have a form on my site, and when someone fills it out, the information is copied to my database.

The table is called a "form" and its five columns:

  • ID
  • email
  • phone number
  • A country
  • platform

Now I need to know when each entry in the form was submitted, and I would like to add a β€œcreated at” column that will be populated with the creation time / creation date label.

Can I get the created date for a row already saved in the table?

+8
mysql phpmyadmin
source share
1 answer

Run this script in phpMyAdmin?

ALTER TABLE Form ADD Column CreatedOn timestamp NOT NULL DEFAULT current_timestamp ; 
+22
source share

All Articles