我正在codeigniter中工作。我的问题是我想显示具有相同ID的所有行。但是当我执行group_by时,它只输出该组的一行。下面在Codeigniter中选择('*')with group_by
是我的模型
function category_content(){
$this->db->select('*');
$this->db->from('category');
$this->db->group_by('category_id');
$query = $this->db->get();
return $query->result_array();
}
请帮助。
,而不是由,如果你想获得特定ID的记录然后通过使用where子句组ID – 2015-04-01 12:22:16
使用顺序组使用顺序是使用的时候,需要把相同的行。 – 2015-04-01 12:35:45