I noticed that all my images on the posts here weren’t showing and it was because the url to their location was still pointing at the sub blog on The Comluv Network so I needed a way to edit the database to update the url to point to the files held here.
Easy with a REPLACE function on the wp_posts table.
You just need 3 things for the replace command :
- The row you’re altering
- The string you’re searching for
- The string you’re replacing with
UPDATE `wp_posts` SET `post_content` = REPLACE( `post_content` , "fiddyp.comluv.com/files/", "fiddyp.co.uk/wp-content/uploads/" )
It did the whole table of posts in less than a second. Sweet, now all my images are back to normal on this site.






31
My life in (other peoples) pictures
August8
ok so, last week, I was like..
but, then I was like..

which had me feeling like..

until I wanted to …

but then..

so I needed to ..

and …

but it was hard…

and inevitably…

but at last!…

so now I’m like…
MYSQL – I OWN YOU!! hahahaha
Now I can really start to get to work on the CommentLuv site. I can pull just about any combination of data out of the database. Things like..
(for version 1.97 CommentLuv upwards)
(that received CommentLuv on them)
(who received CommentLuv)
Keep tuned for more exciting CommentLuv news
Blog News, Code, Funnies