I have a quick question about modifying SQL. I just changed CMS (blog) packages, and ran someone else's import script to move my data from one type of software to another. The conversion went great, but the post author didn't get updated. I started modifying them manually, but I have hundreds of posts, this is going to take forever.
The table has a field for post_author. Most of the posts have 0's for this field (no author specified), I need them to all be one's (me). Is there a script that I can run to do this? I have SSH and phpMyAdmin.
I've backed this database up six ways from Sunday, so if I blow it all up I can recover (though I don't know exactly how to do that, either).
Thanks in Advance,
Use the SQL tab in phpMyAdmin to run the following query (replacing "table_name" with the actual name of the table in question):
UPDATE table_name SET post_author = 1 WHERE post_author = 0;
Thanks NogDog, that worked perfectly. It updated 158 posts in .308 seconds. Beautiful.
Originally Posted by lenwood
I suppose you trying some data recovery tool, yet there is no guarantee indeed that can help. However, it is suppose to use a powerful one. As for me, I've been using Undelete for a while, that is a really powerful utility. IF you wish, you can also try it out.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)