title: Group By with CodeIgniter
body: <p>I use CodeIgniter for my project and this is my code in model</p>
  
  <pre><code>public function group_all_ville(){  
          $this-&gt;db-&gt;select('*');
          $this-&gt;db-&gt;from('departement');
          $this-&gt;db-&gt;join('villes', 'villes.num_dept = departement.num_dept');
          $this-&gt;db-&gt;group_by('nom_dept'); 
          $query = $this-&gt;db-&gt;get(); 
          return $query-&gt;result();
      }
  </code></pre>
  
  <p>and this is error after execution</p>
  
  <pre><code>A Database Error Occurred
  
  Error Number: 1055
  
  Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'pneu.departement.id_dept' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
  
  SELECT * FROM `departement` JOIN `villes` ON `villes`.`num_dept` = `departement`.`num_dept` GROUP BY `nom_dept`
  
  Filename: C:/wamp64/www/pneu/system/database/DB_driver.php
  
  Line Number: 691
  </code></pre>
  
  <p>I try different method but nothing result. Thanks</p>