|
|
|
@@ -118,7 +118,7 @@ class Carpark_model extends CI_Model |
|
|
|
->get() |
|
|
|
->result_array(); |
|
|
|
*/ |
|
|
|
$sql = '(select c.cario_no, c.in_out, in_lane, out_lane, c.in_time, c.out_time, c.minutes, c.obj_id as lpr, c.etag, c.in_pic_name, c.out_pic_name, m.member_name as owner, c.in_time as time_order |
|
|
|
$sql1 = '(select c.cario_no, c.in_out, in_lane, out_lane, c.in_time, c.out_time, c.minutes, c.obj_id as lpr, c.etag, c.in_pic_name, c.out_pic_name, m.member_name as owner, c.in_time as time_order |
|
|
|
from cario c left join members m on c.obj_id = m.lpr |
|
|
|
where c.err = 0 and c.out_time is null) |
|
|
|
union |
|
|
|
@@ -126,6 +126,18 @@ class Carpark_model extends CI_Model |
|
|
|
from cario c left join members m on c.obj_id = m.lpr |
|
|
|
where c.err = 0 and c.out_time is not null) |
|
|
|
order by time_order desc limit 10;'; |
|
|
|
|
|
|
|
$sql = '(select c.cario_no, c.in_out, in_lane, out_lane, c.in_time, c.out_time, c.minutes, c.obj_id as lpr, c.etag, c.in_pic_name, c.out_pic_name, m.member_name as owner, c.in_time as time_order |
|
|
|
from cario c left join members m on c.obj_id = m.lpr |
|
|
|
where c.err = 0 and c.out_time is null |
|
|
|
order by time_order desc limit 10) |
|
|
|
union |
|
|
|
(select c.cario_no, c.in_out, in_lane, out_lane, c.in_time, c.out_time, c.minutes, c.obj_id as lpr, c.etag, c.in_pic_name, c.out_pic_name, m.member_name as owner, c.out_time as time_order |
|
|
|
from cario c left join members m on c.obj_id = m.lpr |
|
|
|
where c.err = 0 and c.out_time is not null |
|
|
|
order by time_order desc limit 10) |
|
|
|
order by time_order desc limit 10;'; |
|
|
|
|
|
|
|
$data_cario = $this->db->query($sql)->result_array(); |
|
|
|
|
|
|
|
// $lane_arr = array(0 => '入1', 1 => '入2', 3 => '出3', 3 => '出4'); |
|
|
|
|