From 0c1a85f3d9694449766586310f4ea724fc046ce4 Mon Sep 17 00:00:00 2001 From: banditsmile Date: Fri, 15 Mar 2019 11:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=9B=B4=E6=96=B0bu?= =?UTF-8?q?g=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/Update.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/models/Update.php b/application/models/Update.php index 4b90a12..65488ee 100644 --- a/application/models/Update.php +++ b/application/models/Update.php @@ -22,7 +22,7 @@ public function compress($id){ $id = strip_tags($id); $id = (int)$id; - $sql = "UPDATE img_images SET `compression` = 1"; + $sql = "UPDATE img_images SET `compression` = 1 WHERE imgid={$id}"; $query = $this->db->query($sql); if($query){ return TRUE; @@ -33,9 +33,9 @@ } //更新站点信息 public function site($name,$data){ - $id = strip_tags($name); + $name = strip_tags($name); - $sql = "UPDATE img_options SET `values` = '$data' WHERE `name` = '$name'"; + $sql = "UPDATE img_options SET `values` = '$data' WHERE `name` = '{$name}'"; $query = $this->db->query($sql); if($query){ return TRUE;