Merged changes from stable branch up to 2.3.23.
[fa-stable.git] / admin / db / attachments_db.inc
index 49f73b096edd18e3c2be8e3ae1edd612e11327d7..f3c46dc41332c28b89d32b3d2be59bf40a59efcd 100644 (file)
@@ -103,5 +103,11 @@ function get_sql_for_attached_documents($type)
        ." ORDER BY trans_no DESC";
 }
 
+function move_trans_attachments($type, $trans_from, $trans_to)
+{
+       $sql = "UPDATE ".TB_PREF."attachments SET trans_no=".db_escape($trans_to)
+               ." WHERE type_no=".db_escape($type)." AND trans_no=".db_escape($trans_from);
+       db_query($sql, 'cannot move atachments');
+}
+
 
-?>
\ No newline at end of file