Steven Chan Wed Dec 19 05:55:12 -0500 2012

Subject: insert join date with unix timestamp

here's my code:
$user = member::create(array(
'email' => $_POST['email'],
'password' => md5(base64_encode($_POST['password'])),
'joindate' => ,
'activation_code' => $activation_code
));

what should i put inside joindate to insert unixtimestamp to mysql?
i need the timestamp joindate to find 24 hours inactivate members.


Devin Moore Mon Dec 31 10:22:59 -0500 2012

This isn't really a question for phpactive record, specifically, but to help you out, you would probably want to just use PHP time() function. This function returns the current UNIX timestamp in seconds. Or, if you need milliseconds, microtime().

time(): http://php.net/manual/en/function.time.php

microtime(): http://php.net/manual/en/function.microtime.php

(1-1/1)