本文整理汇总了PHP中lukisongroup\master\models\Unitbarang::findBySql方法的典型用法代码示例。如果您正苦于以下问题:PHP Unitbarang::findBySql方法的具体用法?PHP Unitbarang::findBySql怎么用?PHP Unitbarang::findBySql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lukisongroup\master\models\Unitbarang
的用法示例。
在下文中一共展示了Unitbarang::findBySql方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* ACTION INDEX
*/
public function actionIndex()
{
/*CNT Barang Prodak*/
$cntBrgProdak = "SELECT COUNT(KD_BARANG) As KD_BARANG FROM b0001 WHERE PARENT=1";
$cntBrgPrdk = Barang::findBySql($cntBrgProdak)->one();
/*CNT Barang Umum*/
$cntBrgUmum = "SELECT COUNT(KD_BARANG) As KD_BARANG FROM b0001 WHERE PARENT=0";
$cntBrgUmn = Barang::findBySql($cntBrgUmum)->one();
/*CNT Barang Type*/
$cntType = "SELECT COUNT(NM_TYPE) as NM_TYPE FROM b1001";
$cntTyp = Tipebarang::findBySql($cntType)->one();
/*CNT Barang Kategori*/
$cntCategory = "SELECT COUNT(NM_KATEGORI) as NM_KATEGORI FROM b1002";
$cntCtg = Kategori::findBySql($cntCategory)->one();
/*CNT Barang Unit*/
$cntUnit = "SELECT COUNT(KD_UNIT) as KD_UNIT FROM ub0001";
$cntUnt = Unitbarang::findBySql($cntUnit)->one();
/*CNT Supplier*/
$cntSupplier = "SELECT COUNT(KD_SUPPLIER) as KD_SUPPLIER FROM s1000";
$cntSpl = Suplier::findBySql($cntSupplier)->one();
/*CNT Distributor*/
$cntDistributor = "SELECT COUNT(KD_DISTRIBUTOR) as KD_DISTRIBUTOR FROM d0001";
$cntDist = Distributor::findBySql($cntDistributor)->one();
/*CNT Customer*/
$cntCustomer = "SELECT COUNT(CUST_KD) as CUST_KD FROM c0001";
$cntCst = Customers::findBySql($cntCustomer)->one();
//print_r($cntBrgPrdk->KD_BARANG);
return $this->render('index', ['cntBrgPrdk' => $cntBrgPrdk->KD_BARANG, 'cntBrgUmn' => $cntBrgUmn->KD_BARANG, 'cntTyp' => $cntTyp->NM_TYPE, 'cntCtg' => $cntCtg->NM_KATEGORI, 'cntUnt' => $cntUnt->KD_UNIT, 'cntSpl' => $cntSpl->KD_SUPPLIER, 'cntDist' => $cntDist->KD_DISTRIBUTOR, 'cntCst' => $cntCst->CUST_KD]);
}