本文整理汇总了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]);
}