Im trying to insert values into a table where the ID of the row can only be found by performing a SELECT WHERE on another table. Below is my query:
INSERT INTO wp_postmeta (meta_key, meta_value)
VALUES ('editor_review','5')
WHERE post_id=(SELECT ID from wp_posts
WHERE post_title
LIKE "%The Honest Kitchen ZEAL Grain Free Gluten Free All Life Stages Dog Food%");
Any ideas to do this?
Thanks
1 Answer