Why is this date not being inserted correctly?
Posted on 2014-12-17
I'm doing a basic insert statement after having scraped the data from a webpage.
When I go to insert the date, I repeatedly get "0000-00-00."
I'm grabbing the data using getElementsByTagName and it prints as 12/04/2014. But when I go to insert it into the database, it's not processing it correctly.
I figured it had to be something related to the way I was attempting to insert a string when MySQL needed a date, so I did this:
I echo-ed it, just to make sure I was barking up the right tree, and it still goes into the database as 0000-00-00.
What am I missing?