本文整理汇总了PHP中Requests::findAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::findAll方法的具体用法?PHP Requests::findAll怎么用?PHP Requests::findAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requests
的用法示例。
在下文中一共展示了Requests::findAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setvar
if (!empty($_GET['date1'])) {
if (!empty($_GET['date1']) && !empty($_GET['date2'])) {
$fromdate = $_GET['date1'];
$todate = $_GET['date2'];
setvar("fromdate", $fromdate);
setvar("todate", $todate);
$condition = "create_on BETWEEN ";
$condition .= "'" . $_GET['date1'] . "'";
$condition .= " AND ";
$condition .= "'" . $_GET['date2'] . "'";
$conditions[] = $condition;
}
}
}
if ($do == "del" && !empty($id)) {
//$keyword->del($id);
}
}
setvar("Status", $_PB_CACHE['common_status']);
$amount = $download->findCount(null, $conditions, "id", null);
$page->setPagenav($amount);
//$joins[] = "INNER JOIN {$tb_prefix}customers mf ON Download.req_key=mf.req_key";
$joins[] = null;
$fields = "Id,msisdn,req_id,create_on,short_code,game_id,user_name,cp_id,cp_game_id";
$result = $download->findAll($fields, $joins, $conditions, "id DESC", $page->firstcount, $page->displaypg);
//print_r($result);
//exit;
setvar("TotalRequest", $amount);
setvar("Items", $result);
setvar("ByPages", $page->getPagenav());
template($tpl_file);
示例2: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new Requests('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Requests'])) {
$model->attributes = $_GET['Requests'];
}
$criteria = new CDbCriteria();
$criteria->with = array('user', 'doc');
$criteria->compare('doc.state', 'Inquiry');
$criteria->compare('t.state', 'WAIT');
$dataProvider = $model->findAll($criteria);
$this->render('admin', array('model' => $model, 'dataProvider' => $dataProvider));
}