本文整理汇总了PHP中Am_Query::selectAllRecords方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Query::selectAllRecords方法的具体用法?PHP Am_Query::selectAllRecords怎么用?PHP Am_Query::selectAllRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Query
的用法示例。
在下文中一共展示了Am_Query::selectAllRecords方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderInvoiceCommissions
function renderInvoiceCommissions(Invoice $invoice, Am_View $view)
{
$query = new Am_Query($this->getDi()->affCommissionTable);
$query->leftJoin('?_invoice', 'i', 'i.invoice_id=t.invoice_id')->leftJoin('?_user', 'a', 't.aff_id=a.user_id')->leftJoin('?_product', 'p', 't.product_id=p.product_id')->addField('CONCAT(a.login, \' (\', a.name_f, \' \', a.name_l,\') #\', a.user_id)', 'aff_name')->addField('p.title', 'product_title')->addWhere('t.invoice_id=?', $invoice->pk())->leftJoin('?_aff_payout_detail', 'apd', 't.payout_detail_id=apd.payout_detail_id')->leftJoin('?_aff_payout', 'ap', 'ap.payout_id=apd.payout_id')->addField('ap.date', 'payout_date')->addField('ap.payout_id')->addField('apd.is_paid')->setOrder('commission_id', 'desc');
$items = $query->selectAllRecords();
$view->comm_items = $items;
$view->invoice = $invoice;
$view->has_tiers = $this->getDi()->affCommissionRuleTable->getMaxTier();
return $view->render('blocks/admin-user-invoice-details.phtml');
}
示例2: payoutAction
public function payoutAction()
{
$query = new Am_Query($this->getDi()->affPayoutDetailTable);
$query->leftJoin('?_aff_payout', 'p', 'p.payout_id=t.payout_id');
$query->addField('p.*')->addWhere('aff_id=?', $this->user->pk());
$this->view->payouts = $query->selectAllRecords();
$this->view->display('aff/payout.phtml');
}