本文整理汇总了PHP中unknown_type::findCount方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::findCount方法的具体用法?PHP unknown_type::findCount怎么用?PHP unknown_type::findCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown_type
的用法示例。
在下文中一共展示了unknown_type::findCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionPsdLink
public function actionPsdLink()
{
$this->_modelLyPsdLink = $this->_getGlobalData('Model_LyPsdLink', 'object');
$gameTypes = $this->_modelLyPsdLink->getMyGame();
$this->_loadCore('Help_SqlSearch');
$helpSqlSearch = new Help_SqlSearch();
$helpSqlSearch->set_tableName($this->_modelLyPsdLink->tName());
$_GET['game_type_id'] = intval($_GET['game_type_id']);
if ($_GET['game_type_id']) {
$helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
} else {
$InData = array_keys($gameTypes);
$InData = implode(',', $InData);
$helpSqlSearch->set_conditions("game_type_id in ({$InData})");
}
$StartTime = strtotime($_GET['start_time']);
if ($StartTime) {
$helpSqlSearch->set_conditions("edit_time>={$StartTime}");
}
$EndTime = strtotime($_GET['end_time']);
if ($EndTime) {
$helpSqlSearch->set_conditions("edit_time<={$EndTime}");
}
$helpSqlSearch->set_orderBy('Id desc');
$helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
$sql = $helpSqlSearch->createSql();
$dataList = $this->_modelLyPsdLink->select($sql);
foreach ($dataList as &$sub) {
$sub['game_type'] = $gameTypes[$sub['game_type_id']];
$sub['edit'] = Tools::url(CONTROL, 'PsdLinkOpt', array('zp' => 'LianYun', 'Id' => $sub['Id'], 'doaction' => 'edit'));
$sub['del'] = Tools::url(CONTROL, 'PsdLinkOpt', array('zp' => 'LianYun', 'Id' => $sub['Id'], 'doaction' => 'del'));
}
$conditions = $helpSqlSearch->get_conditions();
$this->_loadCore('Help_Page');
//载入分页工具
$helpPage = new Help_Page(array('total' => $this->_modelLyPsdLink->findCount($conditions), 'perpage' => PAGE_SIZE));
$this->_view->assign('pageBox', $helpPage->show());
$this->_view->assign('dataList', $dataList);
$gameTypes[0] = Tools::getLang('ALL', 'Common');
$this->_view->assign('gameTypes', $gameTypes);
$this->_view->assign('selected', $_GET);
$this->_utilMsg->createPackageNavBar();
$this->_view->display();
}
示例2: _spActivityIndex
private function _spActivityIndex()
{
#------初始化------#
$this->_createServerList();
$serverList = $this->_getGlobalData('gameser_list');
$this->_modelFrgSpecialActivity = $this->_getGlobalData('Model_HaiDaoSpecialActivity', 'object');
$this->_loadCore('Help_SqlSearch');
$this->_loadCore('Help_Page');
#------初始化------#
$helpSqlSearch = new Help_SqlSearch();
$helpSqlSearch->set_tableName($this->_modelFrgSpecialActivity->tName());
$_REQUEST['operator_id'] = intval($_REQUEST['operator_id']);
if ($_REQUEST['operator_id']) {
$helpSqlSearch->set_conditions("operator_id={$_REQUEST['operator_id']}");
$this->_view->assign('selectedOperatorId', $_REQUEST['operator_id']);
}
if ($_REQUEST['title']) {
$helpSqlSearch->set_conditions("(Title like '%{$_REQUEST['title']}%' )");
$this->_view->assign('selectedTitle', $_REQUEST['title']);
}
if ($_REQUEST['is_group']) {
// $helpSqlSearch->set_groupBy('Title,IdentifierValue,StartTime,EndTime');
$helpSqlSearch->set_groupBy('Title,IdentifierValue');
$helpSqlSearch->set_field('count(*) as server_num,Id,operator_id,server_id,special_activity_id,Identifier,IdentifierValue,Img,IsOpen,Title,Content,AwardDesc,StartTime,EndTime,CheckType,AwardIds,Awards,GetCond,Status,MsgTitle,MsgContent,MsgContent,IsShow');
$this->_view->assign('selectedGroupBy', true);
}
$open = array('0' => Tools::getLang('CLOSE', 'Common'), '1' => Tools::getLang('OPEN', 'Common'));
$show = array('0' => Tools::getLang('NOT_DISPLAY', 'Common'), '1' => Tools::getLang('DISPLAY', 'Common'));
$helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
$helpSqlSearch->set_orderBy('server_id');
$conditions = $helpSqlSearch->get_conditions();
$sql = $helpSqlSearch->createSql();
$dataList = $this->_modelFrgSpecialActivity->select($sql);
if ($dataList) {
foreach ($dataList as $key => &$val) {
$val['URL_edit'] = Tools::url(CONTROL, ACTION, array('zp' => self::PACKAGE, 'doaction' => 'edit', 'title' => $val['Title'], 'IdentifierValue' => $val['IdentifierValue'], 'StartTime' => $val['StartTime'], 'EndTime' => $val['EndTime'], 'operator_id' => $_REQUEST['operator_id'], 'server_id' => $val['server_id'], 'special_activity_id' => $val['special_activity_id']));
}
}
$serverListFullName = Model::getTtwoArrConvertOneArr($serverList, 'Id', 'full_name');
$this->_view->assign('serverListFullName', $serverListFullName);
if ($_REQUEST['is_group']) {
$FiledGroupBy = $helpSqlSearch->getFiledGroupBy();
$count = $this->_modelFrgSpecialActivity->countGroupBy($conditions, $FiledGroupBy);
} else {
$count = $this->_modelFrgSpecialActivity->findCount($conditions);
}
$helpPage = new Help_Page(array('total' => $count, 'perpage' => PAGE_SIZE));
$this->_view->assign('pageBox', $helpPage->show());
$this->_view->assign('tplServerSelect', 'Notice/MultiServerSelect.html');
$this->_view->assign('dataList', $dataList);
$this->_view->assign('is_open', $open);
$this->_view->assign('is_show', $show);
$this->_utilMsg->createPackageNavBar();
$this->_view->display();
}