Are term_taxonomy_id and term_id the same?
I have a custom query where I need a JOIN because I want to COUNT all the posts of a specific category.
So I checked the tables and I found out that table wp_term_relationships
contains a reference to the wp_term_taxonomy
table. The term_taxonomy_id
.
However when I looked into the wp_term_taxonomy
table again I found out that term_taxonomy_id
and term_id
are having the exact same values.
So are they always the same? Can I filter the results by category with only joining wp_term_relationships
and using term_taxonomy_id
?
Topic join-tables wp-query wpdb categories Wordpress
Category Web