Consider this:
+---------------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+-------------------+-----------------------------+
| email_address | varchar(100) | NO | PRI | NULL | |
| create_date | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| optin_date | timestamp | YES | | NULL | |
| optout_date | timestamp | YES | | NULL | |
+---------------+--------------+------+-----+-------------------+-----------------------------+
Using PHP, how can I make the optin_date
and optout_date
columns store the current timestamp?