check for this line:
$getattach = $DB_site->query("SELECT attachment.attachmentid,attachment.userid,attachme nt.dateline,attachment.filenam e,attachment.visible ".iif($privattach,',attachment.private','').",atta chment.counter,post.postid,pos t.threadid,thread.title,user.username FROM attachment LEFT JOIN post on attachment.attachmentid=post.attachmentid LEFT JOIN thread USING(threadid) LEFT JOIN user on attachment.userid=user.userid WHERE attachment.visible=1 AND post.attachmentid<>0 ".iif($privattach,'AND private=0','')." LIMIT $min,$perpage");
|