Re: timestamp and NOW('') in php / mysql
| From: | Unknown Sender | Date: | Sun, 06 Aug 2000 00:33:07 +0000 |
| Subject: | Re: timestamp and NOW('') in php / mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10287@lists.php.net to get a copy of this message | ||
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@VAIOSR1K>...
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