wordpress - MYSQL remove word from a column in a table -
i'm using wordpress , want go through entire wp_posts database using mysql remove word "on" slugs.
i've tried these 2 lines;
update wp_posts set post_name = replace(post_name, '%on-%', '') post_type = "post"; select *, replace(post_name, '%on-%', '') wp_posts post_type = "post";
they dont remove word 'on' things such "12th-annual-helmets-on-kids-campaign"
thanks guys
try
update wp_posts set post_content = replace(post_name, 'on-', '') post_type = "post";
and omit %
.
Comments
Post a Comment