I need help in writing up a sql query that updates posts in wp_posts table based on the category id I select. This query selects the posts I want but I want to update a specific column in all of these posts. select * FROM wp_posts LEFT JOIN wp_term_relationships ON(wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy ON(wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE wp_term_taxonomy.term_id = 178
You should write a script which will update information using data from your "select" query in cycle.