Translations of this page: en bg cs de fi fr hu it ja pl ru tr zh

This is an old revision of the document!


Database Tables Reference

The following is a complete list of all PunBB 1.2 database tables and their respective fields. Primary key fields are underlined.

Field Type Default Description
id int The auto-incrementing (identity) primary key identifier for this table.
username varchar(200) NULL The username this ban applies to.
ip varchar(255) NULL The IP address(es) or partial IP address(es) this ban applies to.
email varchar(50) NULL The e-mail address or e-mail address domain name this ban applies to.
message varchar(255) NULL A message that is displayed for the banned user.
expire int NULL A UNIX timestamp representing the day when the ban expires.

categories

Field Type Default Description
id int The auto-incrementing (identity) primary key identifier for this table.
cat_name varchar(80) 'New Category' The name of the category.
disp_position int 0 The vertical display position of the category (relative to other categories).

censoring

Field Type Default Description
id int The auto-incrementing (identity) primary key identifier for this table.
search_for varchar(60) The term to search for.
replace_with varchar(60) The term to replace search_for with.

config

Field Type Default Description
conf_name varchar(255) The name of a configuration variable. General configuration options start with the prefix o_ and general permission options start with p_.
conf_value text NULL The value of the configuration variable conf_name.

forum_perms

Field Type Default Description
group_id int The user group for which these permissions apply. Primary key identifier together with forum_id for this table.
forum_id int The forum in which these permissions apply. Primary key identifier together with group_id for this table.
read_forum tinyint/smallint 1 0 = Deny. 1 = Allow.
post_replies tinyint/smallint 1 0 = Deny. 1 = Allow.
post_topics tinyint/smallint 1 0 = Deny. 1 = Allow.

forums

Field Type Default Description
id int The auto-incrementing (identity) primary key identifier for this table.
forum_name varchar(80) 'New forum' The name of the forum.
forum_desc text NULL A description of the forum.
redirect_url varchar(100) NULL The URL to redirect users to upon clicking the forum link on the index page.
moderators text NULL A serialized PHP array of moderators.
num_topics mediumint/int 0 The number of topics the forum contains.
num_posts mediumint/int 0 The number of posts the forum contains.
last_post int NULL A UNIX timestamp representing the date/time the last post was made in the forum.
last_post_id int NULL The ID of the last post that was made in the forum.
last_poster varchar(200) NULL The username (or guest name) of the user that made the last post in the forum.
sort_by tinyint/smallint 0 0 = Display topics sorted by last post. 1 = Display topics sorted by topic start.
disp_position int 0 The vertical display position of the forum (relative to other forums in the same category).
cat_id int 0 The category in which the forum resides.

groups

Field Type Default Description
g_id int The auto-incrementing (identity) primary key identifier for this table.
g_title varchar(50) The name of the group.
g_user_title varchar(50) NULL The title of users in this group.
g_read_board tinyint/smallint 1 0 = Deny. 1 = Allow.
g_post_replies tinyint/smallint 1 0 = Deny. 1 = Allow.
g_post_topics tinyint/smallint 1 0 = Deny. 1 = Allow.
g_post_polls tinyint/smallint 1 0 = Deny. 1 = Allow.
g_edit_posts tinyint/smallint 1 0 = Deny. 1 = Allow.
g_delete_posts tinyint/smallint 1 0 = Deny. 1 = Allow.
g_delete_topics tinyint/smallint 1 0 = Deny. 1 = Allow.
g_set_title tinyint/smallint 1 0 = Deny. 1 = Allow.
g_search tinyint/smallint 1 0 = Deny. 1 = Allow.
g_search_users tinyint/smallint 1 0 = Deny. 1 = Allow.
g_edit_subjects_interval smallint 300 Number of seconds after post time that users in this group may edit the subject of topics they've posted.
g_post_flood smallint 30 Number of seconds that users in this group have to wait between posts.
g_search_flood smallint 30 Number of seconds that users in this group have to wait between searches.

Personal Tools