Created
October 14, 2013 03:55
-
-
Save mir4a/6970485 to your computer and use it in GitHub Desktop.
Update custom field mmm_term_id for lesson posts type that has category taxonomy
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
UPDATE `wp_posts`, `wp_term_relationships` | |
SET `wp_posts`.`mmm_term_id` = `wp_term_relationships`.`term_taxonomy_id` | |
WHERE `wp_posts`.`ID` = `wp_term_relationships`.`object_id` AND `wp_posts`.`post_type` = 'lesson' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment