MyBB Documentation


The 1.6 Documentation is no longer maintained and some information may be outdated.

The MyBB 1.6 series reached end of life on October 1, 2015.

This means there will be no more security or maintenance releases for these series and forums running these versions of MyBB may be at risk of unfixed security issues. All administrators are strongly encouraged to upgrade their forums to the latest release of MyBB as soon as possible.

Stores the information about attachments

Field Type Null Key Default Description
aid int(10) No Attachment ID
pid int(10) No 0 Post ID associated with the attachment
posthash varchar(50) No Post hash of the post which the attachment will be associated with. The post hash is used to identify posts before the post has been inserted into the database (ie before it gets a real post ID).
uid int(10) No 0 Uploader's user ID
filename varchar(120) No Original filename of the attachment
filetype varchar(120) No Type of file
filesize int(10) No 0 File size in bytes
attachname varchar(120) No The filename of the attachment stored in the filesystem
downloads int(10) No 0 The number of downloads
dateuploaded bigint(30) No 0 Date attachment was uploaded in UNIX timestamp
visible int(1) No 0 Either 1, meaning approved and visible, or 0 meaning unapproved and hidden.
thumbnail varchar(120) No Either "SMALL" or the filename to the thumbnail of the attachment


Keyname Type Cardinality Field
posthash INDEX None posthash
pid INDEX None pid, visible
uid INDEX None uid
MyBB Documentation
Front End Index Page - Portal - Forum Display - Thread Display - Posting Threads and Replies - Searching - User CP - Member Profile - Private Messages - Calendar - Member List - Help Docs - Who Is Online - Lite (Archive) Mode - Forum Team - Statistics - RSS Syndication - Miscellaneous
Moderation Standard Thread Moderation - Inline Thread Moderation - Inline Post Moderation - Warning System
Mod CP Home - Forums and Posts - Users
Admin CP Home - Configuration - Forums & Posts - Users & Groups - Templates & Style - Tools & Maintenance
Templates & Themes Images - Postbit - Templates - Themes
Developer Database Methods - Database Tables
Miscellaneous Cookies - UTF8 Setup - Default Settings

Edit this page on GitHub