DIR : /home/kozerus/public_html/go/dgs0/specs/db/table-Posts.txt

/home/kozerus/public_html/go/dgs0/specs/db

###
### Description of mysql table:  Posts
###

Here you'll find some infos about the tree-structure of posts.
For full description of fields for Posts-TABLE, see "specs/forums.txt"

A thread of various is organized as tree. The root is the thread starter post.
Replying posts are represented as tree nodes to a parent post.

Example:
  ID   Parent_ID  Thread_ID  Depth   AnswerNr   Subject
  100      0        100        1        1       Post A
  101    100        100        2        1       Post A.A
  102    101        100        3        1       Post A.A.A
  103    102        100        4        1       Post A.A.A.A
  104    101        100        3        2       Post A.A.B
  107    100        100        2        2       Post A.B
  108    107        100        3        1       Post A.B.A

-------------------------------------------------

| Field         | Type                  | Null | Key | Default             | Extra          |
+---------------+-----------------------+------+-----+---------------------+----------------+
| ID            | int(11)               | NO   | PRI | NULL                | auto_increment |
| Forum_ID      | smallint(6)           | NO   | MUL | 0                   |                |
| Time          | datetime              | NO   | MUL | 0000-00-00 00:00:00 |                |
| Lastchanged   | datetime              | NO   | MUL | 0000-00-00 00:00:00 |                |
| Lastedited    | datetime              | NO   |     | 0000-00-00 00:00:00 |                |
| Subject       | varchar(80)           | NO   | MUL |                     |                |
| Text          | text                  | NO   |     | NULL                |                |
| User_ID       | int(11)               | NO   |     | NULL                |                |
| Parent_ID     | int(11)               | NO   | MUL | 0                   |                |
| Thread_ID     | int(11)               | NO   | MUL | 0                   |                |
| Flags         | tinyint(3) unsigned   | NO   |     | 0                   |                |
| AnswerNr      | mediumint(8) unsigned | NO   |     | 0                   |                |
| Depth         | tinyint(3) unsigned   | NO   |     | 0                   |                |
| crc32         | int(11)               | YES  |     | NULL                |                |
| PosIndex      | varchar(80)           | NO   | MUL |                     |                |
| old_ID        | int(11)               | NO   |     | 0                   |                |
| Approved      | enum('Y','N','P')     | NO   | MUL | Y                   |                |
| PostsInThread | mediumint(8) unsigned | NO   |     | 0                   |                |
| Hits          | int(11)               | NO   |     | 0                   |                |
| LastPost      | int(11)               | NO   |     | 0                   |                |


## Fields:

* Parent_ID : int (FK id)
  - Posts.ID, the current post replies to
  - 0 for initial thread-post

* Thread_ID : int (FK id)
  - Posts.ID, which started the thread
  - appears in all Posts of the same thread

* Flags : flags
  - 0x01 = read-only flag (executives may reply)

* Depth : int
  - Thread starter post has depth=1
  - Depth in the thread-tree, which is number of generations

* AnswerNr : int
  - Positional number starting with 1 (each child-tree-node starts with 1)
  - Number-position of siblings in the thread-tree with the same depth,
    i.e. posts to a parent post

* PosIndex : string
  - A string used to sort the posts in the thread using the database
  - The string is composed of the PosIndex of the parent post plus
    two letters, which encodes the AnswerNr in base 64, where the letters
    are given by $order_str (see forum/forum_functions.php).
    Any PosIndex will begin by '**' (2 times the first char of $order_str)
  - If PosIndex is empty, the post has been edited and is not active

//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer