Posts: 876
Name: Matt Pealing
Location: England, north west
|
I have the following SELECT query for a Wordpress database:
Code:
SELECT * FROM wp_posts
INNER JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_term_taxonomy
ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
AND wp_term_taxonomy.taxonomy = 'category'
AND wp_term_taxonomy.term_id = 442);
However I need to add an UPDATE statement in there too and have no idea how to go about it.
Basically I have a field called 'post_type'. Any record that is returned in the results of the SELECT query needs to have its 'post_type' field value changed to 'featured-property'.
Does anyone know how I would go about this?
|