Re: [PHP] timestamp and NOW('') in php / mysql From: (no email)
Date: 08/05/00

use the function <? date("YmdHis") ?> it will have the same output type than
mysql's NOW()

"Neil M" a écrit dans le message
<003001bffe40$1598ca00$ba39fea9 <email protected>>...
Hello all

I have been writing a job tracking system but am having a few problems with
getting a sensible validation of the timestamps i have set.

i insert a record containing data , one of the fileds is time_stamp with the
value NOW('')

When i try to compare the mysql NOW('') stamp and mktime() they are very
very different for e.g. :

<SNIP>

$my_new_time_stamp = mktime ();
print ("<BR>output new stamp: $my_new_time_stamp");
print ("<BR>output db value : $myrow->time_stamp");

the output:

output new stamp: 965411494
output db value : 20000804185021

so am i using the xorrect type of comparison ? probably not.

Any ideas / advice gratefully recieved :)

thx

Neil

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>