我不明白为什么这个查询只提取1行,但必须有34000行。没有错误产生。 $ fromDate ='2015-10-01',$ toDate ='2015-10-31' and $ supervisorIdArray is flatten array。CodeIgniter查询楼
$this->db->select('production.supervisor_id,production.employee_id,production.operation_id, SUM(production.quantity) as quantity,production_operation.operation_id,production_operation.rate');
$this->db->from('production');
$this->db->join('production_operation','production_operation.operation_id = production.operation_id', 'left');
$this->db->where('production.production_date >=',$fromDate);
$this->db->where('production.production_date <=',$toDate);
$this->db->where_in('production.supervisor_id',$supervisorIdArray);
$this->db->order_by('production.supervisor_id','ASC');
$this->db->order_by('production.employee_id','ASC');
$this->db->order_by('production.operation_id','ASC');
$query = $this->db->get();
$Rows = $query->num_rows();
$ query的结果值是多少? – Tristan
有多少个ID在$ supervisorIdArray –
@ toby-allen最多451 –