nieuwe onderst. vorm ook opslaan als aantal 0 is

This commit is contained in:
2026-02-03 18:40:55 +01:00
parent c35552cc66
commit e265e257b8
3 changed files with 16 additions and 16 deletions
@@ -37,14 +37,13 @@ class Aantalxondersteuningsvorm_model extends MY_Model{
return $this->get_query_row('aantal');
}
function getaantallen($vormid, $orgid,$schooljaarnr, $groepids){
function getaantallen($vormid, $orgid){
$this->sql ="SELECT G.id, G.naam, IF(AOS.id,aantal,0) AS aantal
FROM tb_groepen G
LEFT JOIN tb_aantalxondersteuningsvorm AOS ON ( G.id = AOS.groep_id
AND AOS.ondersteuningsvorm_id = {$vormid})
WHERE G.organisatie_id = {$orgid}
AND G.schooljaarnr= {$schooljaarnr}
AND G.id IN ({$groepids})
ORDER BY G.niveau, G.naam, G.id";
return $this->get_query_result();
}