title: Mysql GROUP_BY issue (active record)
body: <p>What I'm trying to do in the query below: questions are posted that belong to 1 continent and 1 country. Answers are posted to these questions by a user. In the query below I get all that data and the <strong>number of answers</strong>. </p>
  
  <p>The issue is that the COUNT(answers.text) returns a number of 1 when it should actually be zero. This is in case there is no answer to a question.</p>
  
  <p>To cut a long story short, I'm not sure how the GROUP_BY should be used and feel this is the problem. Can anyone explain?</p>
  
  <hr>
  
  <p>$this->db->select('questions.id, users.username, url_title, title, questions.text, questions.date_posted, continents.full_name as continent, countries.full_name as country');</p>
  
  <p>$this->db->select("COUNT('answers.text') as nbr_answers"); </p>
  
  <p>$this->db->join('continents', 'questions.loc_continent = continents.id');</p>
  
  <p>$this->db->join('countries', 'questions.loc_country = countries.id');</p>
  
  <p>$this->db->join('answers', 'answers.q_fid = questions.id', 'left');</p>
  
  <p>$this->db->join('users', 'users.id = answers.user_id_fk', 'left');</p>
  
  <p>$this->db->order_by('questions.id','desc'); </p>
  
  <p>$this->db->group_by('url_title');</p>