Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.142.198.250
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/entregupd.php |
<?php
function entregupd($aobj_context)
{
$query = "select fdegree,if(ifnull(freglastupd,'') = '',fregprefix,freglastupd) as fregprefix
from entdeg
where ifnull(fdeleted,'') <> 'T'
and ifnull(fregprefix,'') <> ''
order by fdegree";
$result = $aobj_context->mobj_db->getAll($query);
foreach($result as $value)
{
$fdegree = $value['fdegree'];
$fregprefix = $value['fregprefix'];
$upd = "select s.fappno from entstudadm s inner join entoptdeg d on s.fappno = d.fappno
where ifnull(s.fpaystatus,'') = 'success'
and fdegree = '{$fdegree}'
and ifnull(d.fregno,'') = ''";
$res1 = $aobj_context->mobj_db->getAll($upd);
foreach($res1 as $val)
{
$fappno = $val['fappno'];
$updquery = "update entoptdeg set fregno = '{$fregprefix}'
where fappno = '{$fappno}' and fdegree = '{$fdegree}'";
$lobj_update = $aobj_context->mobj_db->Execute($updquery);
$fregprefix++;
}
$query = "update entdeg set freglastupd = '{$fregprefix}'
where fdegree = '{$fdegree}'";
$res2 = $aobj_context->mobj_db->Execute($query);
echo $fdegree.": Completed </br> ";
}
}
function entregrurupd($aobj_context)
{
$query = "select fentregprefix from control";
$result = $aobj_context->mobj_db->getRow($query);
$fregprefix = $result['fentregprefix'];
//and fappno in(select fappno from entoptdeg where fdegree = 'MCOM')
$upd = "select distinct s.fappno from entstudadm s where ifnull(s.fpaystatus,'') = 'success'
and ifnull(s.fregno,'') = ''";
$res1 = $aobj_context->mobj_db->getAll($upd);
foreach($res1 as $val)
{
$fappno = $val['fappno'];
$updquery = "update entstudadm set fregno = '{$fregprefix}'
where fappno = '{$fappno}' and ifnull(fpaystatus,'') = 'success'";
$lobj_update = $aobj_context->mobj_db->Execute($updquery);
$fregprefix++;
}
$query = "update control set fentregprefix = '{$fregprefix}'";
$res2 = $aobj_context->mobj_db->Execute($query);
echo $fregprefix.": Completed </br> ";
}
?>
|