RE: [PHP] php or Mysql for DATE?
| From: | David Smith | Date: | Thu, 15 Mar 2001 07:20:45 +0000 |
| Subject: | RE: [PHP] php or Mysql for DATE? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43983@lists.php.net to get a copy of this message | ||
Try using
<?
$date = date ("Y-m-d H:i:s");
?>
which formats the same as MySQL...
-----Original Message-----
From: Dhaval Desai [mailto:dhaval_adams@yahoo.com]
Sent: Thursday, March 15, 2001 2:19 AM
To: php-general@lists.php.net
Subject: [PHP] php or Mysql for DATE?
I want to have a posting column wherein people can
post their messages and when a new message is posted
the Curent date has to be added in the mysql database.
Do u think I should use Php to generate the date or
should I have mysql to generate the date.
I am also going to allow people to search for messages
as per date. For example
Search for messasges in the last week and stuff..
Please advice me..
THank You
Dhaval Deasi
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net