phpBB

Development Wiki

Difference between revisions of "Table.phpbb topics track"

From phpBB Development Wiki

(Fields)
(Added info about phpbb_forums_track relationship)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
This table keeps record for visited topics in order to mark them as read or unread. We use the ''mark_time'' timestamp in conjunction with last post of topic '''x''''s timestamp to know if topic '''x''' is read or not.
 
This table keeps record for visited topics in order to mark them as read or unread. We use the ''mark_time'' timestamp in conjunction with last post of topic '''x''''s timestamp to know if topic '''x''' is read or not.
 +
 +
In order to accurately tell whether a topic is read, one has to also check phpbb_forums_track.
  
 
== Fields ==
 
== Fields ==
Line 13: Line 15:
 
| primary key
 
| primary key
 
| not null, unique
 
| not null, unique
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_users|phpbb_users]]'
+
| {{fk|users|user_id}}
 
|-
 
|-
 
| topic_id
 
| topic_id
Line 19: Line 21:
 
| primary key
 
| primary key
 
| not null, unique
 
| not null, unique
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_topics|phpbb_topics]]'
+
| {{fk|topics|topic_id}}
 
|-
 
|-
 
| forum_id
 
| forum_id
Line 25: Line 27:
 
| tbd
 
| tbd
 
| not null
 
| not null
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_forums|phpbb_forums]]'
+
| {{fk|forums|forum_id}}
 
|-
 
|-
 
| mark_time
 
| mark_time
Line 48: Line 50:
 
|}
 
|}
 
{{table-stub}}
 
{{table-stub}}
 +
[[Category:Database Tables]]

Latest revision as of 21:16, 16 August 2011

This table keeps record for visited topics in order to mark them as read or unread. We use the mark_time timestamp in conjunction with last post of topic x's timestamp to know if topic x is read or not.

In order to accurately tell whether a topic is read, one has to also check phpbb_forums_track.

Fields

column type (MySQL) content default comment
user_id mediumint(8) unsigned primary key not null, unique

references phpbb_users.user_id

topic_id mediumint(8) unsigned primary key not null, unique

references phpbb_topics.topic_id

forum_id mediumint(8) unsigned tbd not null

references phpbb_forums.forum_id

mark_time int(11) unsigned tbd 0 Last visit to this topic (timestamp)

Keys

name fields
PRIMARY user_id
topic_id
forum_id forum_id