RE: [PHP-DB] I need to INSERT tomorrows date....

From: Date: Mon, 09 Oct 2000 11:37:13 +0000
Subject: RE: [PHP-DB] I need to INSERT tomorrows date....
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3431@lists.php.net to get a copy of this message
Your best bet is to convert the dates to a unix timestamp first, PHP is very handy in that; On the documentation from PHP you'll find enough date functions for this. As soon as you got the current time in a unix timestamp format, just add <days>*24*60*60. -----Original Message----- From: Trond Erling Hundal [mailto:webmaster@port-industry.com] Sent: Monday, October 09, 2000 12:39 PM To: php-db@lists.php.net Subject: [PHP-DB] I need to INSERT tomorrows date.... Hey.. I am developing a news portal for a newspaper, and one of the desired functions here is that the reporters want to be able to put in articels that will not appear on the web until the day they want it to be "published" I`ve been experimenting with DATE_ADD(NOW(), INTERVAL 1 DAY) in the INSERT command, but this only returns a null value in the date field. I was kind of hoping that I wouldn`t have to do a SELECT DATE_ADD(NOW(), INTERVAL 1 DAY command , and then insert this result into the INSERT command... I wonder what I am doing wrong... 1. Is it possible to insert the DATE_ADD command with MySQL (And I`ve been having som typos in the command) or is there some other way of doing this?? Pls help me... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#3431) next »