Re: Question About Date Function in PHP/MySQL
| From: | John W. Holmes | Date: | Mon, 09 Feb 2004 16:10:50 +0000 |
| Subject: | Re: Question About Date Function in PHP/MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177142@lists.php.net to get a copy of this message | ||
Freedomware wrote:
When I view my data in phpMyAdmin, all I see in that column is NULL. When I preview it in a webpage, nothing displays at all. If I change it to NOT NULL, I see 0000-00-00 in every cell. Here's a row of text from the CSV file I imported into my MySQL table: "Alberta","Edmonton","1905-09-01",11,"NWT","AB","CAN" As you can see, the date is listed as "1905-09-01."Well, that's the right format for a MySQL date; YYYY-MM-DD, so I don't know why it wouldn't load from your CSV file. Can you show the command that you use to import the file? If the fields are NULL (or 0000-00-00) in the database, then MySQL is not accepting your data (for the date field at least). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com