Skip to content

Instantly share code, notes, and snippets.

@mir4a
Created October 14, 2013 04:05
Show Gist options
  • Save mir4a/6970581 to your computer and use it in GitHub Desktop.
Save mir4a/6970581 to your computer and use it in GitHub Desktop.
Insert new relation for lessons to join them with courses
INSERT INTO `wp_postmeta` (`post_id`,`meta_key`,`meta_value`)
SELECT ID,'_lesson_course',`mmm_term_id`
FROM `wp_posts` WHERE `post_type` = 'lesson'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment