need hep writing specific SQL query for $WPDB object
-
Hi Everyone,
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:
ID
post_author
post_date
post_date_gmt
post_content
post_titleI 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?
Thank you,
KC
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘need hep writing specific SQL query for $WPDB object’ is closed to new replies.