Okay, i am modding a phpbb database that has an attachment mod, i have had to connect 4 tables together which is the easy part, i have tried to use DISTINCT to remove duplicate post_id's but it doesn't work due to the number of tables im adding. here is my SQL Query SELECT phpbb_attachments_desc.attach_id, phpbb_attachments_desc.physical_filename, phpbb_attachments.attach_id, [color=red]phpbb_attachments.post_id[/color], phpbb_posts.post_id, phpbb_posts.topic_id, phpbb_topics.topic_id, phpbb_topics.forum_id, phpbb_topics.topic_time, phpbb_topics.topic_attachment FROM phpbb_attachments_desc, phpbb_attachments, phpbb_posts, phpbb_topics WHERE phpbb_attachments_desc.attach_id = phpbb_attachments.attach_id AND phpbb_attachments.post_id = phpbb_posts.post_id AND phpbb_posts.topic_id = phpbb_topics.topic_id AND phpbb_topics.topic_attachment = 1 ORDER BY phpbb_topics.topic_time DESC What I Need is to remove these duplicate post_id's from the this query, as i want to show a preview of the attachment posted in the topic, please see attachment for screenshot. Any help would be great. thanks [attachment deleted by admin]