RE: [PHP] syntax for date math expressions
| From: | Maxim Maletsky | Date: | Wed, 03 Apr 2002 21:30:46 +0000 |
| Subject: | RE: [PHP] syntax for date math expressions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91417@lists.php.net to get a copy of this message | ||
> as a string. MySQL's TIMESTAMP is not the same thing as PHP's.
Let me be the devil's layer here, Erik.
In order to achieve the best portability and to gain the best
performance you'd better use mySQL date field types to store the dates.
If you need the PHP timestamps you can simply use another date function
of mySQL (which was that?) on the SELECT and receive your data already
in UNIX timestamp values.
There's no way you can prove to me that PHP's timestamp is better in the
mySQL's varchar(20) (20?? Why not 10 then and why not INT? Enough or the
next 320 years or so... we just recently turned to 10m) instead of the
simple timestamp(14).
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim@phpbeginner.com
www.phpbeginner.com