Database Server
Database Name
User name
Password

RSStudent(); $oC->BeginTrans(); echo "\n"; echo "\n"; $i=0; while ($oS->GetRecord()){ //อ่านทุกคนจากตารางนักศึกษา echo ""; echo "\n"; } //while echo "\n"; echo "
นักศึกษาดำเนินการ
$oS->studentCode :: $oS->studentNameSurname"; $oUm->searchByUserLogin($oS->studentCode); //หาตามรหัสนิสิต if (!$oUm->GetRecord()){ //ถ้าไม่มีใน um $oU->addNewUser($oS->studentCode, $oS->studentNameSurname, 6, 2, $oS->studentCode, $oS->studentCode); echo "เพิ่มใหม่ "; }else{ //มีใน um if ($oS->studentStatus<=4){ //สถานะ อยู่ $sql = "update umuser set UsName='$oS->studentNameSurname', UsActive=1 where UsLogin='$oS->studentCode'"; $oC->Execute($sql); echo "ปรับปรุงสถานะเป็น active"; }else{ //สถานะ ไม่อยู่ ออก $sql = "update umuser set UsName='$oS->studentNameSurname', UsActive=0 where UsLogin='$oS->studentCode'"; $oC->Execute($sql); echo "ปรับปรุงสถานะเป็น No active"; } } $i++; echo "

จำนวนทั้งสิ้น $i รายการ
\n"; //echo "===start Reset Group===
"; $oU->updateGroupDefault(); //echo "===Stop Reset Group==="; $oC->CommitTrans(); } ?>