imekul Posted July 13, 2008 Share Posted July 13, 2008 Hi guys, I have a WordPress database that has 751 blog entries that I have imported. The problem is that the dates are incorrect, and I want to fix them. Instead of manually updating each row (which, obviously, would take quite some time), I'd like to be able to import data straight into the post_date column of my table. The "correct" dates are just stored like this: 2008-07-04 02:26:00 2008-07-04 11:20:00 2008-07-05 12:44:00 2008-07-05 02:19:00 2008-07-06 01:59:00 2008-07-08 02:31:00 2008-07-09 01:32:00 ...and so on, up to 751. I would love to find an easy way to just be able to import this into the post_date column, but I can't find a way to replace the existing data. Another option that I can think of is to make a long MySQL UPDATE query, but the only problem with this is that the unique ID in my WP table is unfortunately not completely unbroken. It starts at 6 and goes all the way up to 802, which means there are about 50 rows missing along the way. So I guess I have two questions. One, if it's possible to "re-seat" the existing 751 rows, where they will be ID'd as 0-750, that would make it much easier to do some sort of a batch update, I would think. The second option would be to just find a way to merge these 751 lines into the post_date column of the 751 rows in my table. Any ideas on how this could be done? I'm not incredibly proficient at MySQL, but I can get around in phpMyAdmin. The main goal is simply to update the post_date field of the 751 preexisting rows, and put in the data from the 751 lines from the "corrected" file. Thanks for reading this. Any help would be appreciated! Luke Quote Link to comment Share on other sites More sharing options...
fenway Posted July 14, 2008 Share Posted July 14, 2008 If there's a 1-to-1 mapping btween the IDs, it should be easy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.