PDA

View Full Version : How to move a Blog Entry to another user?


edenx
Wed 9th Apr '08, 12:21am
How do I move a Blog Entry, with his own comments to another user?

I've created a special PR user for a PR Blog and don't want to miss the old Entrys i've created with my old user.

Thanks

Reeve of Shinra
Wed 9th Apr '08, 12:28am
don't think you can

kentaurus
Wed 9th Apr '08, 1:04am
How do I move a Blog Entry, with his own comments to another user?

I've created a special PR user for a PR Blog and don't want to miss the old Entrys i've created with my old user.

Thanks

I'm going to assume you know how to run a SQL query and that you know what you're doing. Please realize I'm not official support.

1. Find the BLOGID, that's the id of the entry. Example http://forums.etc.com/blog.php?b=XXX
XXX would be the blogid

2. Get the userid for the NEW user

3. Execute the following queries:
UPDATE blog SET userid=<NEW_USERID> WHERE blogid=<BLOGID>;
UPDATE blog_text SET userid=<NEW_USERID> WHERE blogid=<BLOGID>;
UPDATE blog_attachment SET userid=<NEW_USERID> WHERE blogid=<BLOGID>;



That'll move the blog entry and all comments to the new user.

edenx
Wed 9th Apr '08, 8:55am
Thanks Kentaurus!

BTW I think this should be noted as a feature suggestion for a future Blog upgrade.

daveconz
Thu 26th Jun '08, 1:01am
Thanks Kentaurus, I found that very useful :)

daveconz
Thu 26th Jun '08, 1:29am
One thing... it didn't catch blog categories. I used PHPMyAdmin to update the following tables: blog_category and blog_categoryuser

daveconz
Thu 26th Jun '08, 6:30am
Clean up the blog_user table for tidiness. Can't post all the details, in a hurry. Sorry.