[development] Attachment Indexing module.
Darrel O'Pry
dopry at thing.net
Thu Mar 9 20:58:19 UTC 2006
On Thu, 2006-03-09 at 18:30 +0000, Adam Cooper wrote:
> Hello all,
>
> So far I've created all the back end administration interface and I am
> now moving on to the actual work part but I am having problems with
> the file revisioning system. I need some clarification of the file and
> file_revisions table so I can write some more specific SQL.
>
> I would only like to index attachments if they are listed on the node
> but I have no idea how the 'list' column of file_revisions controls
> this behaviour. It seems that if it is a '0' then it isn't listed, but
> if it is anything else, it is. Is this correct?
>
You are correct, and the join for a node is something like
SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d and r.list != 0
You could always just use
upload_load($node)
foreach ($node->files as $file) {
if ($file->list) {
//do your thing
}
}
> Is there any documentation on the structure of the DB? as I cannot
> find any and it would help.
> Thanks
> Adam
>
> P.S. If this is the wrong list then apologies. I could not find a
> module development list.
>
>
More information about the development
mailing list