Szuka, szukam i znaleźć nie mogę.
Mam zmienną:
$miss_time = new DateTime($miss_time); $miss_time->format('Y-m-d H:i:s');
Oraz zapytanie sql:
$sql = "UPDATE `users` SET `time`= '$miss_time' WHERE `id` = '$user_id'";
Problem w tym, że otrzymuję to:
"Catchable fatal error: Object of class DateTime could not be converted to string in"
Jak upchnąć tą datę do bazy?