get all attachments in a thread?

Neuro

Member
I'm looking through the attachment models and the xf_attachment* databases, and I'm a little confused.

Do I have to go through each post in a thread to call getAttachmentsByContentId to collect all attachments?

I'm trying to gather all attachments in a thread and show them in a little area above a thread.
 
I think probably you should get all the posts in a thread and then search the attachments table with these post ids
 
I think probably you should get all the posts in a thread and then search the attachments table with these post ids

thank you. i'm looking through the thread model to see if i can find something that'll return all posts.
 
Top Bottom