I put together a join statement to sum numbers together in the select_command but when it do a search/edit it comes up with errors. I think i'm going to try to go around this by pushing this an update before the grid starts but was hoping there maybe a fix to this?
My current code sits like this:
$g->select_command = "SELECT * from rmprogram rmp
left join (select rmname,
SUM(tva IS NOT NULL and tva <> '') as tv,
SUM(int2a IS NOT NULL and int2a <> '') as internet,
SUM(pha IS NOT NULL and pha <> '') as phone,
SUM(ph2a IS NOT NULL and ph2a <> '') as phone2,
SUM(sata IS NOT NULL and sata <> '') as satellite,
(SUM(tva IS NOT NULL and tva <> ''))+
SUM(int2a IS NOT NULL and int2a <> '') +
(SUM(pha IS NOT NULL and pha <> ''))+
(SUM(sata IS NOT NULL and sata <> '')) as total
from rmreferral
where rmname != ''
group by rmname)
rmf ON rmp.rmid = rmf.rmname
AND rmp.rmStatus != 'SUB'";
The numbers display fine but you cannot edit or search after that