PDA

View Full Version : Attachment info on seperate vB page?


FleaBag
04-29-2003, 10:55 PM
I want to have attachment info on a seperate vB page, e.g. a vB powered page that just allows files I want listed to be shown. What code do I use to pull this info from the database? Does anyone have nay ideas? Thanks...

filburt1
04-29-2003, 11:26 PM
$attachment = $DB_site->query_first("SELECT a.userid, u.username, a.filename, a.counter, a.dateline
FROM attachment a, user u
WHERE a.userid = u.userid AND a.attachmentid = whatever");
$attachment['date'] = vbdate($dateformat, $attachment['dateline']);
$attachment['time'] = vbdate($timeformat, $attachment['dateline']);

FleaBag
04-30-2003, 12:21 AM
So all I need do is replace 'whatever' with the ID? And use the variables used in the templates for showthread?

filburt1
04-30-2003, 12:26 AM
Yes, although I don't know what showthread has to do with this?

FleaBag
04-30-2003, 12:56 PM
Because on showthread you see attachments?