phpBB

Development Wiki

Difference between revisions of "Table.phpbb topics track"

From phpBB Development Wiki

m ({{table-stub}})
(expanded info)
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.
  
 
== Fields ==
 
== Fields ==
Line 7: Line 7:
 
! content
 
! content
 
! default
 
! default
 +
! comment
 
|-
 
|-
 
| user_id
 
| user_id
 
| mediumint(8) unsigned
 
| mediumint(8) unsigned
 
| primary key
 
| primary key
| 0
+
| not null, unique
 +
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_users|phpbb_users]]'
 
|-
 
|-
 
| topic_id
 
| topic_id
 
| mediumint(8) unsigned
 
| mediumint(8) unsigned
 
| primary key
 
| primary key
| 0
+
| not null, unique
 +
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_topics|phpbb_topics]]'
 
|-
 
|-
 
| forum_id
 
| forum_id
 
| mediumint(8) unsigned
 
| mediumint(8) unsigned
 
| tbd
 
| tbd
| 0
+
| not null, unique
 +
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_forums|phpbb_forums]]'
 
|-
 
|-
 
| mark_time
 
| mark_time
Line 27: Line 31:
 
| tbd
 
| tbd
 
| 0
 
| 0
 +
| Last visit to this topic (timestamp)
 
|}
 
|}
  

Revision as of 15:35, 13 September 2009

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.

Fields

column type (MySQL) content default comment
user_id mediumint(8) unsigned primary key not null, unique FOREIGN KEY, REFERENCES 'phpbb_users'
topic_id mediumint(8) unsigned primary key not null, unique FOREIGN KEY, REFERENCES 'phpbb_topics'
forum_id mediumint(8) unsigned tbd not null, unique FOREIGN KEY, REFERENCES 'phpbb_forums'
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