varsql="select * , (select count(*) from cmdb.ci c where c.parent_id = id) as childs from cmdb.ci where family_type_id = 1 and id > 0 order by display_name";
varsql="select * , (select count(*) from cmdb.ci c where c.parent_id = id) as childs from cmdb.ci where family_type_id = 1 and id > 0 order by family_type_id, family_id, display_name";
varsql="select * , (select count(*) as childs from cmdb.ci child where child.parent_id = parent.id) as childs from cmdb.ci parent where parent.parent_id = $1 order by display_name";
varsql="select * , (select count(*) as childs from cmdb.ci child where child.parent_id = parent.id) as childs from cmdb.ci parent where parent.parent_id = $1 order by family_type_id, family_id, display_name";
varsql="select *, group_type_id as class_id from cmdb.ci_family_group union select *, account_type_id as class_id from cmdb.ci_family_account order by class_id "