0

I have the following query and get the below error message:

update `wp_posts` set  `post_excerpt` = replace( `post_excerpt`, "[av_font_icon icon='ue82d' font='entypo-fontello' size='14px' position='left' color='' custom_class=''][/av_font_icon]", '') where instr( `post_excerpt`, "[av_font_icon icon='ue82d' font='entypo-fontello' size='14px' position='left' color='' custom_class=''][/av_font_icon]") > 0;

#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 '"[av_font_icon icon='ue82d' font='entypo-fontello' size='14px' position='left' c' at line 1

I am trying to find the shortcode within my wordpress database and remove it. Does anyone know what is wrong? many thanks

4
  • Do you use phpmyadmin? Commented Sep 15, 2015 at 17:50
  • yes thats where I am running the query Commented Sep 15, 2015 at 18:39
  • 1
    IN your error message I see 3 quotes at the beginning,make sure they are double quotes Commented Sep 15, 2015 at 18:44
  • tried that also, still get same error :( Commented Sep 15, 2015 at 19:01

2 Answers 2

1

Why don't you use the "Database Search And Replace Script In PHP"? All you have to do is place it in the root folder and run it in your browser. https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

That's what I use and have never had a problem. Just make sure to make a back up just in case.

Run a search for the short code and replace it with an empty field.

Sign up to request clarification or add additional context in comments.

Comments

0

You should escape the single quotes in the string you are matching, using ''

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.