Created
June 2, 2016 15:29
-
-
Save camaech/de22666dfe50a5ff99ed2ed32ff605b9 to your computer and use it in GitHub Desktop.
Add wp_postmeta to Custom Post Type MySql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO vsc_postmeta (post_id, meta_key, meta_value) | |
(SELECT ID AS post_id, 'division' | |
AS meta_key, 'north' AS meta_value | |
FROM vsc_posts WHERE ID NOT IN | |
(SELECT post_id FROM vsc_postmeta WHERE meta_key = 'division') | |
AND `post_type` = 'ivi_assignment_type'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This assumes 'division' is your meta_key and 'north' is the meta_value.