From 8699cd6e00ccee7ecc2637ae9016f2d4b5086c05 Mon Sep 17 00:00:00 2001 From: QxQ Date: Fri, 22 Mar 2019 15:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E5=9F=8E=E8=BB=8A=E4=BD=8D=E6=95=B8?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/Pks_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Pks_model.php b/models/Pks_model.php index fdcd43b..c5203c4 100644 --- a/models/Pks_model.php +++ b/models/Pks_model.php @@ -362,7 +362,7 @@ class Pks_model extends CI_Model //12171金城特殊計數 public function carno_updata_12171() { - $sql = "SELECT (B.parked - A.sum_parked) as parked, (B.tot - A.sum_tot) - (B.parked - A.sum_parked) as availables FROM (SELECT SUM(parked) as sum_parked,SUM(tot) as sum_tot FROM pks_groups WHERE group_id !=\"RF\" AND group_type > 1) A, pks_groups B WHERE B.group_id = \"C888\""; + $sql = "SELECT (B.parked - A.sum_parked) as parked, (B.tot - A.sum_tot) - (B.parked - A.sum_parked) as availables FROM (SELECT SUM(parked) as sum_parked,SUM(tot) as sum_tot FROM pks_groups WHERE group_id !=\"RF\" AND group_type > 1) A, pks_groups B WHERE B.group_id = \"P1\""; $result = $this->db->query($sql)->result_array(); $sql = "UPDATE `pks_groups` SET `parked`={$result[0]['parked']},`availables`={$result[0]['availables']} WHERE group_id = \"RF\";"; $this->db->query($sql);