@@ -1,4 +1,4 @@
select tattachmentid,fdocument document,UPPER(postfix) postfix,fobsurl url,serialnumber,type,
case when postfix in ('JPG','PNG','JEPG','jpg','png','jepg') then 'image'
when postfix in ('MP4','mp4') then 'video' else 'file' end type2
-from tattachment where ownertable='HYORDERNODE' and ownerid =$ownerid$
+from tattachment where ownertable='HYORDERNODE' and ownerid =$ownerid$ order by tattachmentid