Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!

MySQL Fix Smart Quotes

By: qwidjib0 on Dec 8th, 2011  |  syntax: MySQL  |  size: 0.21 KB  |  hits: 663  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. UPDATE articles SET text = REPLACE(text,'“','"');
  2. UPDATE articles SET text = REPLACE(text,'”','"');
  3. UPDATE articles SET text = REPLACE(text,"‘","'");
  4. UPDATE articles SET text = REPLACE(text,"’","'");