A wordpress database question wp_terms_relationships
-
Hi so i have created a wordpress site and loaded all of the posts and categories through mysql using a program called sqlyog. I am having one problem i was hoping someone could clarify.
From what i understand in wordpress the database table wp_terms_relationships holds each post and its associated category. the headings in this table are
object_id term_taxonomy_id term_orderwhere
object_id seem to be the unique post id or just the same as the id field from the wp_posts table.
term_taxonomy_id is the term the categories the object_id or unique post is associated with. is this correct?The problem im having is when i try to associate more than 1 category with a post. ie lets say 10=baseball bats and 20=footballs
so i enter 10,20 in the term_taxonomy_id field it doesnt work and only 1 number is accepted. the field only takes one number. So im confused as to the structure of these three tables and where to enter associated categories for posts.Additionally
this is what i think the following tables are for
wp_terms table
term_id name field: a unique number given a category
name: name of category ie)baseball hats
slug field: ie) baseball_hatswp_terms_taxonomy table
term_taxonomy_id field: unique number given here
term_id: is the unique number given to a category in the wp_terms table
taxonomy: is the type of category is a post category or page category
description: desc of a category
parent: is the category is a child or a parent of others
count: how many posts in categoryBottom line: where is the wordpress database can i ascribe multiple categories to a post.
Thanks.
- The topic ‘A wordpress database question wp_terms_relationships’ is closed to new replies.