$postid = $newpost['postid']; $attachs = $vbulletin->db->query_read(" SELECT dateline, filename, attachmentid FROM " . TABLE_PREFIX . "attachment WHERE postid = $postid ORDER BY attachmentid ");