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