From d1cd1693c952ee32baced93f0bb75c3828fd686f Mon Sep 17 00:00:00 2001 From: "altob.rd" Date: Tue, 21 Nov 2017 09:33:23 +0800 Subject: [PATCH] upd --- controllers/Parkingquery.php | 4 ++-- models/Parkingquery_model.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/Parkingquery.php b/controllers/Parkingquery.php index cc5af1d..9de9726 100644 --- a/controllers/Parkingquery.php +++ b/controllers/Parkingquery.php @@ -112,7 +112,7 @@ class Parkingquery extends CI_Controller public function check_space2() { $seqno = $this->uri->segment(3); - $data = $this->parkingquery_model->check_space($seqno, 2); + $data = $this->parkingquery_model->check_space($seqno, 3); $data['result']['num'] = $seqno; $data['result_code'] = 'OK'; echo json_encode($data, JSON_UNESCAPED_UNICODE); @@ -143,7 +143,7 @@ class Parkingquery extends CI_Controller public function get_valid_seat2() { $pksno = $this->uri->segment(3, 0); // 從某一個車位開始, 若無則設0 - $data = $this->parkingquery_model->get_valid_seat($pksno, 2); + $data = $this->parkingquery_model->get_valid_seat($pksno, 3); echo json_encode($data, JSON_UNESCAPED_UNICODE); } diff --git a/models/Parkingquery_model.php b/models/Parkingquery_model.php index 09e54ff..5524bba 100644 --- a/models/Parkingquery_model.php +++ b/models/Parkingquery_model.php @@ -182,7 +182,7 @@ class Parkingquery_model extends CI_Model left join pks_groups on (pks_groups.group_id = pks_group_member.group_id) where pks.status = 'VA' and prioritys != 0 and (pks.book_time is null or pks.book_time <= now()) - and pks_groups.group_type = 1 + and pks_groups.group_type = {$group_type} order by v asc limit 10 for update; ";