MyBB Community Forums
mybb_attachments which field is related to the post or thread number? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: mybb_attachments which field is related to the post or thread number? (/thread-218894.html)



mybb_attachments which field is related to the post or thread number? - Augustino7 - 2018-07-25

Hi

In the mybb_attachments table which field is related to the post or thread number?

Will the fields tid and pid?

Best Regards


RE: mybb_attachments which field is related to the post or thread number? - Wires - 2018-07-25

Tid is the Thread ID and pid is Post ID.


RE: mybb_attachments which field is related to the post or thread number? - Augustino7 - 2018-07-25

(2018-07-25, 04:02 PM)Wires Wrote: Tid is the Thread ID and pid is Post ID.

The mybb_attachments table does not have the "tid" field, it only has the aid and pid fields

In this case, the aid field is the same as the tid field?


RE: mybb_attachments which field is related to the post or thread number? - linguist - 2018-07-26

aid is attachment ID
pid is post ID

since attachments are attached to posts only, and since posts can be moved between threads, there is no direct link to the thread(s) in the attachments table


RE: mybb_attachments which field is related to the post or thread number? - effone - 2018-07-27

Didn't look into the code but its easy to get the tid using pid. I guess it is used that way only ...