If you want to update any records with join of two tables than please write below code:
Update wp_posts as p
LEFT JOIN wp_postmeta as pm on pm.post_id = p.ID
set p.post_title = "changed title" where pm.meta_key = 'test_post_meta' AND pm.meta_value = '123345346'
Update wp_posts as p
LEFT JOIN wp_postmeta as pm on pm.post_id = p.ID
set p.post_title = "changed title" where pm.meta_key = 'test_post_meta' AND pm.meta_value = '123345346'
No comments:
Post a Comment