codeigniter-base-model
codeigniter-base-model copied to clipboard
How to do a GROUP_CONCAT while using this base model
trafficstars
Getting all records and returning one row with field containing concatanated 'tags' field values. Here is how I do it with regular active record:
$this->db->select('GROUP_CONCAT(tags) as tags');
$this->db->from('articles');
$this->db->where("tags != ''");
$result = $this->db->get();
Would be nice not to have to specify the 'from' table. Is there a way to do that select with GROUP_CONCAT but still use this model's get methods?