full group by uitzetten
This commit is contained in:
@@ -13,9 +13,11 @@
|
||||
|
||||
|
||||
class MY_Model extends CI_Model{
|
||||
|
||||
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
// Disable ONLY_FULL_GROUP_BY for legacy queries
|
||||
$this->db->query("SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))");
|
||||
}
|
||||
|
||||
function get_record_by_id($id, $fieldname=FALSE, $row=TRUE){
|
||||
|
||||
@@ -117,7 +117,7 @@ class Groepen_model extends MY_Model{
|
||||
AND GR.schooljaarnr = {$schooljaarnr}
|
||||
AND GR.schooltype = 'R'
|
||||
AND GR.module = {$module}
|
||||
GROUP BY GR.id
|
||||
GROUP BY GR.id, GR.naam, GR.niveau, GR.totaantal, GR.ondersteuning
|
||||
ORDER BY niveau, naam, GR.id ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
@@ -146,7 +146,7 @@ class Groepen_model extends MY_Model{
|
||||
AND GR.schooljaarnr = {$schooljaarnr}
|
||||
AND GR.schooltype = 'R'
|
||||
AND GR.module = {$module}
|
||||
GROUP BY GR.id
|
||||
GROUP BY GR.id, GR.naam, GR.niveau, GR.totaantal
|
||||
ORDER BY niveau, naam, GR.id ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user