Reputation: 95
UPDATE P
SET P.post_type = 'banner-slide'
FROM `berwickr_wordpress.wp_posts` AS P
INNER JOIN berwickr_wordpress.wp_term_relationships AS T
ON P.ID = T.object_id
WHERE T.term_taxonomy_id = 3
Getting this error:
#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 'FROM berwickr_wordpress.wp_posts AS P INNER JOIN berwickr_wordpress.wp_term_rel' at line 3
Where's the snytax errors?
Upvotes: 0
Views: 48
Reputation: 198436
UPDATE
does not use FROM
. Try this:
UPDATE berwickr_wordpress.wp_posts AS P
INNER JOIN berwickr_wordpress.wp_term_relationships AS T
ON P.ID = T.object_id
SET P.post_type = 'banner-slide'
WHERE T.term_taxonomy_id = 3
EDIT: extra OP backticks (*_*)
Upvotes: 1