full group by uitzetten

This commit is contained in:
2026-03-10 16:11:52 +01:00
parent 90b4f0d08e
commit 44bc260061
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -13,9 +13,11 @@
class MY_Model extends CI_Model{ class MY_Model extends CI_Model{
function __construct(){ function __construct(){
parent::__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){ function get_record_by_id($id, $fieldname=FALSE, $row=TRUE){
+2 -2
View File
@@ -117,7 +117,7 @@ class Groepen_model extends MY_Model{
AND GR.schooljaarnr = {$schooljaarnr} AND GR.schooljaarnr = {$schooljaarnr}
AND GR.schooltype = 'R' AND GR.schooltype = 'R'
AND GR.module = {$module} 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 "; ORDER BY niveau, naam, GR.id ";
return $this->get_query_result(); return $this->get_query_result();
} }
@@ -146,7 +146,7 @@ class Groepen_model extends MY_Model{
AND GR.schooljaarnr = {$schooljaarnr} AND GR.schooljaarnr = {$schooljaarnr}
AND GR.schooltype = 'R' AND GR.schooltype = 'R'
AND GR.module = {$module} AND GR.module = {$module}
GROUP BY GR.id GROUP BY GR.id, GR.naam, GR.niveau, GR.totaantal
ORDER BY niveau, naam, GR.id "; ORDER BY niveau, naam, GR.id ";
return $this->get_query_result(); return $this->get_query_result();
} }