Code

Drupal term insert sql

Recently having needed to add the same term to different drupal sites this is the sql I used.

There are two values that you need to change.

The first is the "2" which is the vocabulary ID and the second is "Open Day" which is the name of the term.

You could also choose to add a description with the term.

What caught me out at first was I forgot to add a record for the term to the "term_hierarchy" table which stops the term from displaying.

Subscribe to Code

Like what you see

You can of course always follow me on twitter to get regular updates