1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about Attachments.

Discussion in 'XenForo Development Discussions' started by Mr. Goodie2Shoes, Jan 27, 2015.

  1. Mr. Goodie2Shoes

    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)
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.

Share This Page