News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1203401409:v:use_geshi-1:v:type-php

Started by Guest, Feb 19, 2008, 06:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guest

SELECT
a.id_folder, a.filename, a.attachment_type, a.id_attach, a.id_member, a.id_msg,
thumb.id_folder AS thumb_folder, IFNULL(thumb.id_attach, 0) AS id_thumb, thumb.filename AS thumb_filename, thumb_parent.id_attach AS id_parent
FROM smf_attachments AS a
LEFT JOIN smf_attachments AS thumb ON (thumb.id_attach = a.id_thumb)
LEFT JOIN smf_attachments AS thumb_parent ON (a.attachment_type = 3 AND thumb_parent.id_thumb = a.id_attach)
WHERE a.id_member IN (1)