[wp-hackers] term_taxonomy_id = term_id. Always?
Haluk Karamete
halukkaramete at gmail.com
Mon Apr 9 06:12:03 UTC 2012
Well, I started out with a fresh install
Then I added category. I called it termX.
Then I added a child to that category. I called the child termX too!
and finally I created a tag. And I called that too termX.
then I visited the wp_terms table, this is what I get
[image: Full Texts]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&sql_query=SELECT+%2A+FROM+%60wp_terms%60&goto=tbl_structure.php&dontlimitchars=1&token=4c394724a38de0ad52e84ab222cb2bec>
term_id<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_terms%60+ORDER+BY+%60wp_terms%60.%60term_id%60+ASC>
name<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_terms%60+ORDER+BY+%60wp_terms%60.%60name%60+ASC>
slug<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_terms%60+ORDER+BY+%60wp_terms%60.%60slug%60+ASC>
term_group<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_terms%60+ORDER+BY+%60wp_terms%60.%60term_group%60+ASC>[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_terms%60.%60term_id%60+%3D+1&sql_query=SELECT+%2A+FROM+%60wp_terms%60&goto=sql.php>[image:
Delete]1Uncategorizeduncategorized0[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_terms%60.%60term_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_terms%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_terms%60+WHERE+%60wp_terms%60.%60term_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_terms%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_terms%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
2Blogrollblogroll0[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_terms%60.%60term_id%60+%3D+3&sql_query=SELECT+%2A+FROM+%60wp_terms%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_terms%60+WHERE+%60wp_terms%60.%60term_id%60+%3D+3+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_terms%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_terms%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
3TermXtermx0[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_terms%60.%60term_id%60+%3D+4&sql_query=SELECT+%2A+FROM+%60wp_terms%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_terms%60+WHERE+%60wp_terms%60.%60term_id%60+%3D+4+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_terms%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_terms%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
4TermXtermx-termx0[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_terms%60.%60term_id%60+%3D+5&sql_query=SELECT+%2A+FROM+%60wp_terms%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_terms&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_terms%60+WHERE+%60wp_terms%60.%60term_id%60+%3D+5+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_terms%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_terms%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
5TermXtag-termx0
First of all, I was expecting to get a single termX. I'm even more confused
now.
But, anyway, let me go on...
Then I checked wp_term_taxonomy
[image: Full Texts]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60&goto=tbl_structure.php&dontlimitchars=1&token=4c394724a38de0ad52e84ab222cb2bec>
term_taxonomy_id<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60+ORDER+BY+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+ASC>
term_id<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60+ORDER+BY+%60wp_term_taxonomy%60.%60term_id%60+ASC>
taxonomy<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60+ORDER+BY+%60wp_term_taxonomy%60.%60taxonomy%60+ASC>
description<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60+ORDER+BY+%60wp_term_taxonomy%60.%60description%60+ASC>
parent<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60+ORDER+BY+%60wp_term_taxonomy%60.%60parent%60+ASC>
count<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60+ORDER+BY+%60wp_term_taxonomy%60.%60count%60+ASC>[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+1&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_taxonomy%60+WHERE+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+1+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_taxonomy%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_taxonomy%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
11category 01[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_taxonomy%60+WHERE+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_taxonomy%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_taxonomy%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
22link_category 07[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+3&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_taxonomy%60+WHERE+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+3+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_taxonomy%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_taxonomy%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
33categorytermx the parent00[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+4&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_taxonomy%60+WHERE+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+4+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_taxonomy%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_taxonomy%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
44categorytermx the child30[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+5&sql_query=SELECT+%2A+FROM+%60wp_term_taxonomy%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_taxonomy&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_taxonomy%60+WHERE+%60wp_term_taxonomy%60.%60term_taxonomy_id%60+%3D+5+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_taxonomy%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_taxonomy%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
55post_tagtermx the tag00
Intrestingly, in this table, the term_taxonomy_id and the term_id from 1
all the way to 5 carry the same same ID's. I'm still unable to understand
why do I always get these two ID values the same and what does it take to
cause them to be different? This was actually my originial question.
And finally, in the following table;
[image: Full Texts]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=tbl_structure.php&dontlimitchars=1&token=4c394724a38de0ad52e84ab222cb2bec>
object_id<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60+ORDER+BY+%60wp_term_relationships%60.%60object_id%60+ASC>
term_taxonomy_id<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60+ORDER+BY+%60wp_term_relationships%60.%60term_taxonomy_id%60+ASC>
term_order<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60+ORDER+BY+%60wp_term_relationships%60.%60term_order%60+ASC>[image:
Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+1+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+1+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
120[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+2+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+2+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
220[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+3+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+3+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
320[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+4+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+4+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
420[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+5+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+5+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
520[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+6+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+6+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
620[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+7+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+7+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+2+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
720[image: Edit]<https://p3nlmysqladm001.secureserver.net/nld50/101/tbl_change.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&primary_key=+%60wp_term_relationships%60.%60object_id%60+%3D+1+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+1&sql_query=SELECT+%2A+FROM+%60wp_term_relationships%60&goto=sql.php>[image:
Delete]<https://p3nlmysqladm001.secureserver.net/nld50/101/sql.php?db=devlib&table=wp_term_relationships&token=4c394724a38de0ad52e84ab222cb2bec&sql_query=DELETE+FROM+%60wp_term_relationships%60+WHERE+%60wp_term_relationships%60.%60object_id%60+%3D+1+AND+%60wp_term_relationships%60.%60term_taxonomy_id%60+%3D+1+LIMIT+1&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddevlib%26table%3Dwp_term_relationships%26token%3D4c394724a38de0ad52e84ab222cb2bec%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560wp_term_relationships%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php>
110
the term_taxonomy_id value "2" here...
does it refer to the term_id "2" of the wp_terms table - the "blogroll"
term?
or
does it refer to the term_taxonomy_id "2" of the wp_term_taxonomy table -
the "link_category" taxonomy?
both ID's being 2 makes it difficult to decipher it.
On Sun, Apr 8, 2012 at 10:28 PM, Charles Frees-Melvin <
charles.freesmelvin at me.com> wrote:
> Basically the term is the basic item and let's call the term Foo (term 1)
>
> Term Taxonomy ID defines the taxonomy or taxonomies that foo is associated
> with. Then term taxonomy ID could be 1 for foo the category, 2 for foo the
> tag, 3 for foo the link category. In all these cases there is only one term
> still foo.
>
> Then in term relationship it associates the term taxonomy is to an item.
> Because Tags and Categories are associated with a post Post type then the
> number becomes obviously the post ID. For link categories the link ID, or
> in theory it could be used to relate to anything that has a number ID.
> (User ID or some ID from your own table of data.) Term Order is used for
> special custom sorting situations.
>
> --
> Charles E. Frees-Melvin
>
> Sent from my iPhone 4S on Bell
>
> On 2012-04-08, at 22:53, Haluk Karamete <halukkaramete at gmail.com> wrote:
>
> > I've been trying to understand the how the tables are related by adding
> new
> > tags, cats, sub cats to a fresh install and examine what's happening
> behind
> > the scenes through phpmyadmin.
> >
> > I've observed that for the early records... the two id's in the
> > wp_term_taxonomy ( which are term_taxonomy_id & term_id ) always go hand
> > in hand. Whatever the value is for one is the value for the other. When
> > does these guys break apart?
> >
> > That's my first question.
> >
> > So far, I've observed the following rules
> >
> > Unless you add a new term ( that is adding a new category or tag or add
> new
> > link into the system ), the following two tables won't get changed.
> >
> > wp_terms
> > wp_tem_taxonomy
> >
> > Another way to say the above sentence,
> >
> > wp_terms
> > wp_tem_taxonomy
> >
> > gets changed only when you add a new term.
> >
> > As you associate tags/categories with posts, and links with
> > link_categories, you cause a change in the following table
> >
> > wp_term_relationships
> >
> > there are two important fields in this table, the object_id and
> > term_taxonomy_id,
> > I dunno what the heck term_order is used for here - yet.
> > When I see the object_id "1" in there, I mistakingly thought that the
> > object_id values stored in that table refer to the ID field values of the
> > wp_posts. No. It could be either "id=1 of wp_posts" or the "link_id=1 of
> > wp_links".
> > Also, in the wp_term_relationships table, I see some other records which
> > happen to be related to the term_taxonomy_id 2.
> > I thought that that "2" here refers to the term_taxonomy_id=2 of the
> > "wp_term_taxonomy" table which in turn means the taxonomy
> "link_category".
> > But up until now, I'm not sure if that "2" is the term_id of the wp_terms
> > which in turn means the term "blogroll".
> >
> > Please clarify.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list