Replaced the transaction list in attachments with a pager and made the sorting descent.
[fa-stable.git] / admin / db / attachments_db.inc
index 6ce9960f2d1024321c49b50f12626ae7a1f9aa24..e18000fe3f8f2db9e6f61a70a4b416cdf3ca488c 100644 (file)
@@ -78,5 +78,11 @@ function has_attachment($type, $id)
                return $myrow['id'];
 }
 
+function get_sql_for_attached_documents($type)
+{
+       return "SELECT trans_no, description, filename, filesize, filetype, tran_date, id, type_no FROM ".TB_PREF."attachments WHERE type_no=".db_escape($type)
+       ." ORDER BY trans_no DESC";
+}
+
 
 ?>
\ No newline at end of file