Skip to content

Instantly share code, notes, and snippets.

@blockworks
Created July 19, 2011 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blockworks/1091517 to your computer and use it in GitHub Desktop.
Save blockworks/1091517 to your computer and use it in GitHub Desktop.
WordPressでカスタムフィールドに値を連続挿入する。
//meta_idはnullにすると適したidを振ってくれる。
//特殊記号-+'`&等は、インポートの際、ひっかかるので、削除しておくこと
INSERT INTO `wp_postmeta` (meta_id, post_id, meta_key, meta_value)
VALUES (null,記事ID,'カスタムフィールド名','値'),
(null,記事ID,'カスタムフィールド名','値'),
(null,記事ID,'カスタムフィールド名','値');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment