phpBB

Development Wiki

Table.phpbb topics

From phpBB Development Wiki

description goes here

Fields

column type (MySQL) content default
topic_id mediumint(8) unsigned Primary key auto_increment
forum_id mediumint(8) unsigned

references phpbb_forums.forum_id

0
icon_id mediumint(8) unsigned

references phpbb_icons.icon_id

0
topic_attachment tinyint(1) unsigned 1=at least one post in this topic has an attachment
0=no attachments in this topic
0
topic_approved tinyint(1) unsigned Flag indicating whether the topic is awaiting approval or not. 1
topic_reported tinyint(1) unsigned Flag indicating that a post within the topic has been reported. 0
topic_title varchar(100) The title of the topic.  
topic_poster mediumint(8) unsigned

references phpbb_users.user_id

0
topic_time int(11) unsigned Unix timestamp, the topic's creation date. 0
topic_time_limit int(11) unsigned The number of seconds that a topic will remain as a sticky. 0
topic_views mediumint(8) unsigned The number of time the topic has been viewed. 0
topic_replies mediumint(8) unsigned The number of approved replies to this topic. 0
topic_replies_real mediumint(8) unsigned Total number of replies to this topic (including posts waiting for approval). 0
topic_status tinyint(3) ITEM_UNLOCKED(0), ITEM_LOCKED(1) or ITEM_MOVED(2) 0
topic_type tinyint(3) POST_NORMAL(0), POST_STICKY(1), POST_ANNOUNCE(2) or POST_GLOBAL(3)

Note that when topic_type is POST_GLOBAL (global announcement), then forum_id must be 0

0
topic_first_post_id mediumint(8) unsigned

references phpbb_posts.post_id

0
topic_first_poster_name varchar(255) The topic creator's username.  
topic_first_poster_colour varchar(6) The colour of the topic creator's default user group.  
topic_last_post_id mediumint(8) unsigned

references phpbb_posts.post_id

0
topic_last_poster_id mediumint(8) unsigned

references phpbb_users.user_id

0
topic_last_poster_name varchar(255) The username of the topic's last poster.  
topic_last_poster_colour varchar(6) The colour of the last poster's default user group.  
topic_last_post_subject varchar(100) The subject of the topic's last post  
topic_last_post_time int(11) unsigned Unix timestamp, the last time a post was made in the topic. 0
topic_last_view_time int(11) unsigned Unix timestamp, the last time the topic was viewed. Used in topic pruning. 0
topic_moved_id mediumint(8) unsigned If topic_status is ITEM_MOVED (a shadow topic), this field contains the topic id of the real topic. 0
topic_bumped tinyint(1) unsigned Has this topic been bumped? 1 (yes), 0(no) 0
topic_bumper mediumint(8) unsigned

references phpbb_users.user_id

0
poll_title varchar(100) The poll's question  
poll_start int(11) unsigned Unix timestamp, poll's creation date 0
poll_length int(11) unsigned Poll duration, in seconds 0
poll_max_options tinyint(4) The number of poll options a user can choose when casting a vote 1
poll_last_vote int(11) unsigned Unix timestamp, time of the last vote 0
poll_vote_change tinyint(1) unsigned Are users allowed to change their vote(s)? 1 (yes), 0(no) 0

Keys

name fields
PRIMARY topic_id
forum_id forum_id
forum_id_type forum_id
topic_type
last_post_time topic_last_post_time
topic_approved topic_approved
fid_time_moved forum_id
topic_last_post_time
topic_moved_id