Script To Change Mysql Data

Looking for programmer to write a php script to change the data in a mysql db. This script is actually a wordpress 3.0 multisite upgrade script. If you know wordpress well, it’s good, you will understand the following logic easily.

Here are the things you need to do:

1. change table name.
the current mysql structure is like this:
wp_domain2com_something1….
wp_domain2com_something2….
wp_domain2com_something3….
wp_domain3net_something1….
wp_domain3net_something2….
wp_domain3net_something3….
…….
You need to change it to someting like:
wp_2_something1….
wp_2_something2….
wp_2_something3….
wp_3_something1….
wp_3_something2….
wp_3_something3….
…….

2. add additional info under wp_blogs table
you need to add the info just like below to wp_blogs table:
blog_id : 2 (you need to match this with step 1)
site_id : 1
domain : www.domain1.com
path : domain2com (you need to match this with step 1
registered : 2010-07-05 15:27:50
last_updated :2010-07-05 15:27:50
public :1
archived :1
mature :0
spam :0
deleted :0
lang_id :0

3.change the following values under wp_options

home http://www.domain1.com/domain2com/
siteurl: http://www.domain1.com/domain2com/
fileupload_url: http://www.domain1.com/domain2com/files
upload_path: wp-content/blogs.dir/2/files
domain2com_user_roles –> wp_2_user_roles

Leave a Reply

Your email address will not be published. Required fields are marked *