CodeIgniter GROUP BYを使う
PHP
CodeIgniter GROUP_CONCATを使う
CodeIgniterでGROUP_CONCATを使うには、$this->db->selectの中で使います。
$this->db->select('friends.birthday,
GROUP_CONCAT(friends.name SEPARATOR ",") as friend_name',
false);
$this->db->select()の第二引数がfalseでないと、シンタックスエラーになってしまいます。
忘れがちなので、注意してみてください。
