Skip to content

Instantly share code, notes, and snippets.

@doofusdavid
Created July 24, 2013 16:41
Show Gist options
  • Select an option

  • Save doofusdavid/6072250 to your computer and use it in GitHub Desktop.

Select an option

Save doofusdavid/6072250 to your computer and use it in GitHub Desktop.
Syntax for creating multi-table insert statements to import information into wordpress. This is an excel function.
=CONCATENATE("INSERT INTO wp_3_terms (name, slug) values ('",C2,"', '",E2,"');","
SET @LASTID = LAST_INSERT_ID();","
INSERT INTO wp_3_term_taxonomy (term_id, taxonomy,parent,count) VALUES(@LASTID, 'media_source', 0,0);",
"INSERT INTO wp_3_pods_media_source (@LASTID, ",A2,");")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment