From cc7a82756b4f4d7ab18e928527c37489adbaf564 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Tue, 07 Apr 2015 14:10:50 -0400 Subject: [PATCH] - rewrite of sql queries to new form --- interface/web/client/reseller_del.php | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/web/client/reseller_del.php b/interface/web/client/reseller_del.php index e9d1dd3..55872be 100644 --- a/interface/web/client/reseller_del.php +++ b/interface/web/client/reseller_del.php @@ -59,7 +59,7 @@ $client_id = $app->functions->intval($this->dataRecord['client_id']); - $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE parent_client_id = ".$client_id); + $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE parent_client_id = ?", $client_id); if($tmp["number"] > 0) $app->error($app->lng('error_has_clients')); } @@ -74,15 +74,15 @@ // remove the group of the client from the resellers group $parent_client_id = $app->functions->intval($this->dataRecord['parent_client_id']); - $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = $parent_client_id"); - $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id"); + $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = ?", $parent_client_id); + $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); $app->auth->remove_group_from_user($parent_user['userid'], $client_group['groupid']); // delete the group of the client - $app->db->query("DELETE FROM sys_group WHERE client_id = $client_id"); + $app->db->query("DELETE FROM sys_group WHERE client_id = ?", $client_id); // delete the sys user(s) of the client - $app->db->query("DELETE FROM sys_user WHERE client_id = $client_id"); + $app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id); } } -- Gitblit v1.9.1