I have tried to do some search and replaces on my MySQL 5.x database via phpMyAdmin 2.11.5 and I mucked something up badly and had to start over with a new import.
I would like to avoid that again if possible since the data needs to be live on a website. So I need to be ABSOLLUTY SURE I will get the desired results. Although I understand queries, search and replace on text data, I am a newbie at MySQL & phpMyAdmin.
I would like to search a table "wp_posts" for no data in field" post_type" and replace it with the text string “post”
I have tired the following and it messed something up???
update wp01_posts set post_type = replace(post_type,'','post');
Also how do I define how to limit the querey to run on a small sample of records to test first before running it with confidence on the entire database.
I would also like to search table "wp_posts" for data "8" in field" post_author" and replace it with "3"
Thanks!
I would like to avoid that again if possible since the data needs to be live on a website. So I need to be ABSOLLUTY SURE I will get the desired results. Although I understand queries, search and replace on text data, I am a newbie at MySQL & phpMyAdmin.
I would like to search a table "wp_posts" for no data in field" post_type" and replace it with the text string “post”
I have tired the following and it messed something up???
update wp01_posts set post_type = replace(post_type,'','post');
Also how do I define how to limit the querey to run on a small sample of records to test first before running it with confidence on the entire database.
I would also like to search table "wp_posts" for data "8" in field" post_author" and replace it with "3"
Thanks!