WordPress: MySQL Search and Replace using PHPMyAdmin
I made a slight modification to my page layouts today. I’ve read on John Chow’s blog and on Problogger’s blog that positioning your advertisement within the body of a post can result in a dramatic increase in revenue. Dean is working on his as well.
On Darren’s site, he writes that it’s simply a matter of the readers eye movement. When the banner is at the top of the page, the reader skips over it with no focus. However, when the advertisement is to the right of the content, the reader will actually skim over it.
You’ll notice that I still try to keep my home page clean - putting advertisements outside of the blog posts. I’m certain that changing that and making them more intrusive could make me more revenue; however, I’ve always fought that because it would really affect the readers I care about most - the ones that visit my home page daily.
One of the issues with putting this advertisement in the top right was that this is where I often place a graphic for aesthetic purposes and to dress up my feed and differentiate it from other feeds. I usually alternate a piece of clipart either right or left in the post using:
Image Left:
<img align=”left” src=”pic.jpg”>
Image Right:
<img align=”right” src=”pic.jpg”>
Note: Some folks like to utilize styles for this, but the alignment doesn’t work in your feed utilizing CSS.
Updating every post using Search and Replace:
To easily modify ever single image in every single post to ensure all my images are left justified can be done quite easily using an Update query in PHPMyAdmin for MySQL:
update table_name set table_field = replace(table_field, ‘replace_that’, ‘with_this’);
Specific to WordPress:
update `wp_posts` set `post_content` = replace(`post_content`, ‘replace_that’, ‘with_this’);
To correct my issue, I wrote the query to replace “image=’right’” with “image=’left’”.
NOTE: Be absolutely certain to backup your data prior to making this update!!!


Douglas Karr

I may switch to right justifying my ads too in the near future. It would be interesting to see if any further revenue is generated as a result.
In general, the in-post ads (180 and 250 wide) and the ads after a post (336 wide) have gotten the most attention.
Thanks!
I use a combination. I have the PostPost plugin I wrote… but it still doesn’t do what I really need. Perhaps a release or two in the future?
The rest I simply edit in my theme.
Doug
It’s self-evident, isn’t it - slap an advert, or several, bang in the middle of the viewport and increase your ROI or CPM or any acronym you care to name… or is it?
Yes, if you have a well-established site, lots of backlinks, stable t…
UPDATE ivr_data SET RIGHT( TIME, 2 ) = ‘00′ WHERE RIGHT( TIME, 2 ) != ‘00′;
BTW, came across this post in Google, searching “using mysql search replace query.” Came up 3rd.