impact - 2:37 am on Sep 2, 2010 (gmt 0)
I am trying to insert date('M-d-Y') into mysql database using PHP. I have set the mysql table as DATE
Here is my code:
$creationDate = date('M-d-Y');
mysql_query("INSERT INTO eventDate (A,B,creationDate,D) VALUES ('','','$creationDate','') ");
The query runs without any error but in the database all I can see is
0000-00-00 and nothing actually gets updated.
In the next step, I want to subtract the current date with the date in the database to calculate how many days has passed since the creation date.
Any help will be appreciated.