<%
__header("Content-Type","text/html; charset=gb2312");
db_Open("/NandFlash/tmp/dbDat0.db3");
var sql="select s.*,(select count(*) from tbSubSysDetail where SubSys=s.SubSys and State=1) as State1,(select count(*) from tbSubSysDetail where SubSys=s.SubSys and State=2) as State2 from tbSubSys s where SubSys>0";
db_QryAdv(sql);
db_Close();
%>