R: [PHP] date
| From: | n e t b r a i n | Date: | Thu, 31 Aug 2000 20:58:31 +0000 |
| Subject: | R: [PHP] date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14623@lists.php.net to get a copy of this message | ||
Heikki Korpela wrote
> Or, you could do:
>
> $query = "SELECT FROM_UNIXTIME(".time().") AS tst";
> $result = mysql('database', $query);
> $row = mysql_fetch_array($query);
> print $row['tst'];
>
> Or, you could insert 'NULL' in the timestamp field in MySQL, which
> will update it
>
> Or, if the timestamp field is first timestamp field on row in MySQL,
> just update the row
>
> Or, use CURRENT_TIMESTAMP in MySQL
Well, I'm going to use the others solutions that you suggest me because in
the piece of code where I need the date, I can't open a mysql connection.
Many thanks for all your suggestion.
max