MySQL Forums
Forum List  »  PHP

Re: Automatically dating entries into the MySQL database
Posted by: Grant Thomas
Date: January 03, 2006 04:10PM

In php, use the date() function to format the date. www.php.net/date

$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm

Have the insert query input this into your table.
$sql = "Insert into $table set $column=$today";

Hope this helps

Options: ReplyQuote


Subject
Written By
Posted
Re: Automatically dating entries into the MySQL database
January 03, 2006 04:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.