by alpha
18. December 2007 21:42
SELECT `wp_comments`. * , `user2`. *
FROM `wp_comments` , `user2`
WHERE `user2`.`user_login` = `wp_comments`.`comment_author`
LIMIT 0 , 30
INSERT INTO `ilk830k`.`wp_comments2`
SELECT *
FROM `ilk830k`.`wp_comments` ;
INSERT INTO `ilk830k`.`wp_comments2`(comment_post_ID,comment_content,comment_author,comment_date,comment_date_gmt,comment_author_IP,comment_author_email,comment_author_url)
SELECT `wp_comments`. comment_post_ID ,`wp_comments`. comment_content,`wp_comments`. comment_author,`wp_comments`. comment_date,`wp_comments`. comment_date as comment_date_gmt ,`wp_comments`. comment_author_IP,`user2`.user_email as comment_author_email,`user2`.user_url as comment_author_url
FROM `wp_comments` , `user2`
WHERE `user2`.`user_login` = `wp_comments`.`comment_author`
LIMIT 0 , 30
update `wp_comments2`,`blog_user` set `wp_comments2`.`user_id`=`blog_user`.`user_id` WHERE `blog_user`.`user_name`=`comment_author`
update `wp_comments`,`wp_users` set `wp_comments`.`user_id`=`wp_users`.`id` WHERE `wp_users`.`user_login`=`comment_author`
INSERT INTO `ilk830k`.`wp_posts`(ID,post_author,post_date,post_date_gmt,post_content,post_title,post_category,post_excerpt,comment_count)
SELECT log_id as ID ,log_authorID as post_author,log_postTime as post_date,log_postTime as post_date_gmt,log_content1 as post_content,log_title as post_title,log_catID as post_category,log_content0 as post_excerpt,log_commentCount as comment_count
FROM blog_article
INSERT INTO wp_term_relationships (object_id,term_taxonomy_id)
select ID as object_id,post_category as term_taxonomy_id from wp_posts
update `wp_posts` set `post_content`=CONCAT(`post_excerpt`,'<!--more-->',`post_content`) where length(`post_excerpt`)>2
f3944df5-b49d-4b1a-8bbf-4bb3e611dd05|0|.0
Tags: mysql Views:1543
SqlServer