[Resolved] need hep writing specific SQL query for $WPDB object
I am trying to write a query that will replace the current first post content with another text string. I’m using a standard wordpress database with some of the fields in wp_posts table as follows:
I am using the following query.( the ID I’m trying to replace = 1 )
UPDATE 'wp_posts' SET 'post_content' = replace( 'post_content', '*', 'string_to_find' ) WHERE ID ='1';
I’m getting a syntax error. Can anyone explain this?
- The topic ‘[Resolved] need hep writing specific SQL query for $WPDB object’ is closed to new replies.