当前位置: 首页>>代码示例>>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;未经允许,请勿转载。