select t1.fobsurl,t1.postfix
from tattachment t1
where t1.ownertable = 'tagentactivities'
  and t1.ftype = 'default'
  and t1.siteid =$siteid$
  and t1.ownerid=$tagentactivitiesid$
order by t1.createdate