Home

Your premium source for custom modification services for phpBB

  logo

HomeForumsBlogMOD ManagerFAQSearch Log in

The phpBB Doctor is currently available for private clients only. At this time we are not accepting any new work until we can clear out our current backlog. Thank you for your patience.

TablesTable Structure
phpbb_topics
Topics for your board. A Forum contains Topics. A Topic contains Posts.
Column Name Datatype Default Column Description
topic_id mediumint(8) unsigned
auto_increment
Unique system-assigned (auto-increment) key field for this table. No user interaction is allowed or required for this field.
forum_id smallint(8) unsigned
0 The forum where the topic is first posted.
topic_title char(60)
This field duplicates the post_subject from phpbb_posts for the first post in the topic. The field is managed by the php program logic, not any database rules.
topic_poster mediumint(8)
0 A foreign key that links to the user that started this topic.
topic_time int(11)
0 A unix_timestamp value for when the topic was first entered.
topic_views mediumint(8) unsigned
0 This counter is incremented each time someone views the topic. Multiple pages of the topic are all counted, resulting in multiple views on the topic from the same user.
topic_replies mediumint(8) unsigned
0 A counter for the number of replies. This field can get out of sync on a heavily loaded board, resulting in pagination errors. A fix is documented elsewhere. The reply count is the total post count minus one, as the initial post is not a "reply".
topic_status tinyint(3)
0 A coded field
0 = Unlocked
1 = Locked
2 = Moved
topic_vote tinyint(1)
0 A bit field showing whether this topic includes a poll or not. A zero means no poll, a 1 means a poll is attached.
topic_type tinyint(3)
0 A coded field denoting the type of topic:
0 = Normal
1 = Sticky
2 = Announcement
3 = Global Announcement
That last option is not implemented in the standard phpBB code as of 2.0.17
topic_first_post_id mediumint(8) unsigned
0 A link to the first post in the topic. This is used for a shortcut, so we do not have to query the entire list of posts for the topic just to obtain the first post information. It is possible for this data to be wrong on heavily loaded boards.
topic_last_post_id mediumint(8) unsigned
0 A link to the last post in the topic. This is used for a shortcut, so we do not have to query the entire list of posts for the topic just to obtain the last post information. It is possible for this data to be wrong on heavily loaded boards.
topic_moved_id mediumint(8) unsigned
0 If the topic_status = 2 (Moved) then this field contains the "new" topic that was created. The row with this field set still shows up in the original forum, and is known as a shadow topic.

Table relationships
Forum containing the Topic phpbb_forums.forum_id = phpbb_topics.forum_id
Shadow for Moved Topic phpbb_topics.topic_id = phpbb_topics.topic_moved_id
Topic containing the Post phpbb_topics.topic_id = phpbb_posts.topic_id
Topic containing the Poll phpbb_topics.topic_id = phpbb_vote_desc.topic_id
Topic Watched by User phpbb_topics.topic_id = phpbb_topics_watch.topic_id
First Post for Topic phpbb_topics.topic_first_post_id = phpbb_posts.post_id
Last Post for Topic phpbb_topics.topic_last_post_id = phpbb_posts.post_id
Topic starting user phpbb_users.user_id = phpbb_topics.topic_poster
Legend Notes: [Primary Key] [Foreign Key or other Indexed Field(s)] [Glossary Entry]

Glossary | Graphical Database Diagram (Future Feature)


HomeForumsMOD ManagerFAQSearch Register Log in
Not endorsed by or affiliated with the phpBB Group
Powered by phpBB © phpBB Group
Terms of Service
Web design by MomentsOfLight.com logo