phpBB

Development Wiki

Difference between revisions of "Table.phpbb topics track"

From phpBB Development Wiki

(table structure (beta 4))
 
(Added info about phpbb_forums_track relationship)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
description goes here
+
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 7: Line 9:
 
! content
 
! content
 
! default
 
! default
 +
! comment
 
|-
 
|-
 
| user_id
 
| user_id
 
| mediumint(8) unsigned
 
| mediumint(8) unsigned
 
| primary key
 
| primary key
| 0
+
| not null, unique
 +
| {{fk|users|user_id}}
 
|-
 
|-
 
| topic_id
 
| topic_id
 
| mediumint(8) unsigned
 
| mediumint(8) unsigned
 
| primary key
 
| primary key
| 0
+
| not null, unique
 +
| {{fk|topics|topic_id}}
 
|-
 
|-
 
| forum_id
 
| forum_id
 
| mediumint(8) unsigned
 
| mediumint(8) unsigned
 
| tbd
 
| tbd
| 0
+
| not null
 +
| {{fk|forums|forum_id}}
 
|-
 
|-
 
| mark_time
 
| mark_time
Line 27: Line 33:
 
| tbd
 
| tbd
 
| 0
 
| 0
 +
| Last visit to this topic (timestamp)
 
|}
 
|}
 
  
 
== Keys ==
 
== Keys ==
Line 43: Line 49:
 
|forum_id
 
|forum_id
 
|}
 
|}
 +
{{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