我正在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