Question about Attachments.

Mr. Goodie2Shoes

Well-known member
So I had to look into the XF's attachment thingy for my "Kraken" add-on.
There are a couple of questions I couldn't find an answer:
  1. Why XenForo has xf_attachment and xf_attachment_data? Wouldn't one table have sufficed?
  2. Is data_id is unique to one attachment_id or one data_id can be associated with more than one attachment_id and vice versa?
Thanks! (y)
 
Point 2 sort of answers the first question. It was designed in such a way so that you could associate attachment data to more than one attachment. With that in mind, never assume that attachment_id == data_id.
 
Back
Top Bottom