From 3c5f55d76b02f4418767591b316c0d6d95ac4cef Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 9 Jan 2018 15:36:52 +0100 Subject: [PATCH] Delete client asstes in reverse creation order. --- interface/web/client/client_del.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/client/client_del.php b/interface/web/client/client_del.php index 1540bfbfd..3e3b972c3 100644 --- a/interface/web/client/client_del.php +++ b/interface/web/client/client_del.php @@ -134,7 +134,6 @@ class page_action extends tform_actions { if($client_group_id > 1) { foreach($tables_array as $table) { if($table != '') { - $records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ?", $table, $client_group_id); //* find the primary ID of the table $table_info = $app->db->tableInfo($table); $index_field = ''; @@ -143,6 +142,7 @@ class page_action extends tform_actions { } //* Delete the records if($index_field != '') { + $records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ? ORDER BY ? DESC", $table, $client_group_id, $index_field); if(is_array($records)) { foreach($records as $rec) { $app->db->datalogDelete($table, $index_field, $rec[$index_field]); -- GitLab