unix timestamp bat mysql-ra DATETIME moduen gorde

timestamp: 11292430084 eta gudu DATETIME formatuen gorde mysql-n: 2010-12-15 17:21:24 (YYYY-MM-DD HH:MM:SS)

Adibidez php-tik:

...
$timestamp = time();
$user = 'zital';
$query = "update TAULA set azkenlogina = FROM_UNIXTIME(".$timestamp.") where nick like '".$user."' limit 1";
...

Leave a Reply

Your email address will not be published. Required fields are marked *