Help - Search - Members - Calendar
Full Version: How are ENTRY and CATEGORY linked?
Movable Type Community Forum > Additional Resources > Tips and Tricks
craig1972
Hi,

I looked at the mt_entry table. It has a field called entry_category_id . I thought this would be the field being used for relating the entries to their respective categories, but in my DB, all entries have a NULL value in that field!

What am I missing? My blog seems to work fine, but I cannot figure out how these two tables are connected!

HELP!

Thanks,
Craig
craig1972
Hi,

I looked at the mt_entry table. It has a field called entry_category_id . I thought this would be the field being used for relating the entries to their respective categories, but in my DB, all entries have a NULL value in that field!

What am I missing? My blog seems to work fine, but I cannot figure out how these two tables are connected!

HELP!

Thanks,
Craig
stepan
Please do NOT double post requests...

I suspect that the entry_category_id field in the mt_entry table is a throw back to an older, simle time where you could only have one category per entry. These days, mt_entry and mt_category are joined using the mt_placement table.
craig1972
Thanks! Very helpful.

Sorry, didn't realize I posted twice. I use Opera, and it showed the first time that "Site could not be contacted".
kadyellebee
There is a table named mt_placement that links the categories and the entries together. The entry_category_id is there for legacy reasons, I believe --- when only one category was allowed per post. Now that multiples are allowed, the placement table takes care of it.

(Some of my earliest posts from MT 1.x still have entry_category_id values, but nothing new does, so your database is correct. smile.gif )

Hope that helps,
Kristine
kadyellebee
I merged your topics since I had replied before I realized you already had gotten an answer!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.