KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to insert date into mysql but everytime it fails and comes out as 0000-00-00 in phpmyadmin My date format is like 2012-08-06 (yyyy-mm-dd) and the date field type in database is date . $date = "2012-08-06"; mysql_query("INSERT INTO data_table (title, date_of_event) VALUES('". $_POST['post_title'] ."', '". $date ."')") or die(mysql_error()); tried changing - to / or removing them, it doesn't work.
Tags (comma-separated)
Save Edits
Cancel