mysql - PHP PDO date time formats -
so using php pdo load class have created called 'user' mysql. object contains several fields including 3 date fields. reason, when dump object (using var_export) can see dates stored differently. 1 unix time , others date strings
here dump;
'createdtime' => '2013-04-19 09:36:42', 'logintime' => '2013-04-25 01:32:50', 'lastactiontime' => '1366880785',
all 3 fields defined in mysql datetime, don't understand why has occured.
any ideas?
my php code is;
$sth = $dbh->prepare('select * user id=:id'); $sth->bindparam(':id', $id); $sth->execute(); $sth->setfetchmode(pdo::fetch_class, 'user'); $user = $sth->fetch();
i must have done wrong somewhere, what?