Select Page

Meta Table

A meta table is a relating table that contains additional data for an entry. An example is the post and post meta tables. When you create a post, any additional data that is not defined in the table is stored in the meta table. This is commonly where the Custom Fields are stored.

A meta table consists of a relation ID, a key and a value.

The Meta Table tab in a DB Post Type, allows you to link a relating meta table to form part of the content. Commonly this would be used when creating a post type from the Users or even the Comments tables.

The tab has 5 fields and can seem complicated. Lets look at the fields and their purpose:

Table: This is where you select the meta table to use.

Primary Field: This is the field in the Primary table ( the table selected in General ) that relates to the meta entry.

Relation Field: This is the field that holds the ID from the primary table. So the value in the Primary field in the primary table will be the same value in the relating table.

Meta Key: This is the field that holds the key. This is the name of the value that the entry is. e.g. first_name, email_address, location etc..

Meta Value: this is the field that holds the actual value. So if the meta key is first_name, this is the field that has the name.