當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Employe::findBySql方法代碼示例

本文整理匯總了PHP中lukisongroup\hrd\models\Employe::findBySql方法的典型用法代碼示例。如果您正苦於以下問題:PHP Employe::findBySql方法的具體用法?PHP Employe::findBySql怎麽用?PHP Employe::findBySql使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在lukisongroup\hrd\models\Employe的用法示例。


在下文中一共展示了Employe::findBySql方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionIndex

 /**
  * ACTION INDEX
  */
 public function actionIndex()
 {
     /*CNT Active Employe*/
     $cntAktifEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <> 3 AND EMP_STS<>3";
     $cntAktifEmp = Employe::findBySql($cntAktifEmploye)->one();
     /*CNT Probation Employe*/
     $cntProbationEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS=0";
     $cntProbaEmp = Employe::findBySql($cntProbationEmploye)->one();
     /*CNT Kontrak Employe*/
     $cntContrakEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS=2";
     $cntContrak = Employe::findBySql($cntContrakEmploye)->one();
     /*CNT Tetap Employe*/
     $cntTetapEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS=1";
     $cntTetapEmp = Employe::findBySql($cntTetapEmploye)->one();
     /*CNT Support Employe*/
     $cntSupportEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND SEQ_ID=1";
     $cntSptEmp = Employe::findBySql($cntSupportEmploye)->one();
     /*CNT Bisnis Employe*/
     $cntBisnisEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND SEQ_ID=2";
     $cntBisnisEmp = Employe::findBySql($cntBisnisEmploye)->one();
     /*CNT GenderM Employe*/
     $cntGenderMEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND EMP_GENDER='Male'";
     $cntGenderMEmp = Employe::findBySql($cntGenderMEmploye)->one();
     /*CNT GenderF Employe*/
     $cntGenderFmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND EMP_GENDER='Female'";
     $cntGenderFEmp = Employe::findBySql($cntGenderFmploye)->one();
     /*CNT Resign Employe*/
     $cntResignEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE EMP_STS=3";
     $cntResignEmp = Employe::findBySql($cntResignEmploye)->one();
     return $this->render('index', ['cntAktifEmp' => $cntAktifEmp->EMP_ID, 'cntProbaEmp' => $cntProbaEmp->EMP_ID, 'cntContrak' => $cntContrak->EMP_ID, 'cntTetapEmp' => $cntTetapEmp->EMP_ID, 'cntSptEmp' => $cntSptEmp->EMP_ID, 'cntBisnisEmp' => $cntBisnisEmp->EMP_ID, 'cntGenderMEmp' => $cntGenderMEmp->EMP_ID, 'cntGenderFEmp' => $cntGenderFEmp->EMP_ID, 'cntResignEmp' => $cntResignEmp->EMP_ID]);
 }
開發者ID:adem-team,項目名稱:advanced,代碼行數:34,代碼來源:HrmPersonaliaController.php


注:本文中的lukisongroup\hrd\models\Employe::findBySql方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。