I new to PHP and confused with date, time, datetime and timestamp. I have a MYSQL table contains date, time, datetime and timestamp.
Whats the format to use from PHP to MYSQL fields?
sql_timestamp = gmdate("Y-m-d H:i:s", time());
$date_conv = new DateTime($this->sql_timestamp);
sql_date = $date_conv->format('Y-m-d');
sql_time = $date_conv->format('H:i:s');
sql_datetime = gmdate("Y-m-d H:i:s", time()); ??? I am confused here
I dont see different between DATETIME and Timestamp assignment ? Could anyone help what i need to keep in these four fields? Thank you