Search & Replace in MySQL tables!!

Leave a Reply to Amit Cancel Reply

Comment as a guest.

  1. You can get the number of rows affected by your replace using the PHP function mysql_affected_rows() but I don’t know of any ways of knowing number of replaces done as a row might have more than one replace done on it! 🙂

  2. I messed up the special characters in my wordpress blog when I finally defined the database charset as utf-8.

    I’m trying to search-and-replace the unexpected character strings

    UPDATE wp_posts SET post_content =REPLACE post_content ,’’’,’’’

    My error message alters the string of unwanted characters”: #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘post_content ,’’’,’’” at line 1

    What am I missing?

Sliding Sidebar