当前位置: 首页>>代码示例>>PHP>>正文


PHP Paging::getResultRowStart方法代码示例

本文整理汇总了PHP中Paging::getResultRowStart方法的典型用法代码示例。如果您正苦于以下问题:PHP Paging::getResultRowStart方法的具体用法?PHP Paging::getResultRowStart怎么用?PHP Paging::getResultRowStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Paging的用法示例。


在下文中一共展示了Paging::getResultRowStart方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: news_admin_main

function news_admin_main()
{
    $paging = new Paging('p', _result_per_page(), 1, 9);
    $paging->sCurrentPageClass = 'current';
    $paging->sPageNextClass = 'next';
    $sqlOrder = 'news_id desc';
    if (!empty($_GET['sortby'])) {
        $sortby = $_GET['sortby'];
        $sort = $_GET['sort'];
        if ($sort == 'asc') {
            $sqlOrder = $sortby . ' asc';
        } else {
            if ($sort == 'desc') {
                $sqlOrder = $sortby . ' desc';
            }
        }
    }
    $sqlOrder = 'ordering DESC,is_category desc,' . $sqlOrder;
    $data = array();
    $db = _db();
    $pid = 0;
    $parent = null;
    if (!empty($_GET['pid'])) {
        $pid = $_GET['pid'];
        if ($pid != 0) {
            $db->prepare('SELECT news_id, parent_id FROM `_prefix_news` WHERE news_id=:ID');
            $db->bindValue(':ID', $pid, PARAM_INT);
            $db->execute();
            if ($parent = $db->fetch()) {
                $data['parent'] = $parent;
            } else {
                $pid = 0;
            }
        }
    }
    $cats[0] = '-- Không thuộc nhóm --';
    getCategoryList($cats);
    $data['category'] = $cats;
    $db->prepare('SELECT SQL_CALC_FOUND_ROWS ordering ,is_quantam, is_tieudiem,news_id, news_created, news_title, is_category, is_enabled, is_showintroimage,introimage FROM `_prefix_news` WHERE parent_id=:PARENT_ID ORDER BY :ORDER LIMIT :OFFSET, :TOTAL');
    $db->bindValue(':PARENT_ID', $pid, PARAM_INT);
    $db->bindValue(':ORDER', $sqlOrder, PARAM_NONE);
    $db->bindValue(':OFFSET', $paging->getResultRowStart(), PARAM_INT);
    $db->bindValue(':TOTAL', _result_per_page(), PARAM_INT);
    $db->execute();
    die('xyz');
    if ($items = $db->fetchAll()) {
        $data['items'] = $items;
    }
    //Lay tong cong so record
    $paging->nTotalRow = $db->total_last_limit_query();
    $data['paging'] = $paging;
    return $data;
}
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:53,代码来源:admin.news.php

示例2: showTongquan

function showTongquan(&$data)
{
    $result_per_page = $data['limit'];
    $whereIndustry = buildIndustryWhere($data);
    $whereSe = buildSeWhere($data);
    $paging = new Paging('p', $result_per_page, 0, 9);
    $paging->sCurrentPageClass = 'current';
    $paging->sPageNextClass = 'next';
    $paging->sPageEllipsisClass = 'dotdot';
    $paging->customlink = '/doanh-nghiep/cong-ty/index.html?view=' . $data['view'] . $data['pagingParams'];
    $db = _db('stockbiz');
    $db->prepare('SELECT SQL_CALC_FOUND_ROWS c.Symbol, CompanyName,LFY,Quarter,Year,MarketCapitalization/1000000000 AS MarketCapitalization,DilutedPE_TTM,
    DilutedPE_LFY
    FROM _prefix_companyinfo c, _prefix_lastestfinancialratios f    
    WHERE c.Symbol=f.Symbol AND c.Symbol LIKE ":ALPHABET%" ' . $whereIndustry . $whereSe . '
    ORDER BY :ORDERBY :ORDERTYPE
    LIMIT :OFFSET, :TOTAL');
    $db->bindValue(':OFFSET', $paging->getResultRowStart(), PARAM_INT);
    $db->bindValue(':TOTAL', $result_per_page, PARAM_INT);
    $db->bindValue(':ALPHABET', $data['alphabet'], PARAM_NONE);
    $db->bindValue(':ORDERBY', $data['orderby'], PARAM_NONE);
    $db->bindValue(':ORDERTYPE', $data['ordertype'], PARAM_NONE);
    $db->execute();
    if ($symbols = $db->fetchAll()) {
        //Lay thong tin chung khoan
        $data['symbols'] = $symbols;
        $paging->nTotalRow = $db->total_last_limit_query();
        $data['paging'] = $paging;
    }
}
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:30,代码来源:user.company.php

示例3: securities_user_main

function securities_user_main()
{
    global $fromDate, $toDate, $tmpFromDate, $tmpToDate, $maxTradingDate, $urlParam;
    $data['from_date'] = $fromDate;
    $data['to_date'] = $toDate;
    $data['url_param'] = $urlParam;
    $seId = 1;
    //{ Xu ly khung info
    $data['se'] = 'hose';
    //{{Cau hinh rieng cho san HOSE
    if (!empty($_GET['seid']) && $_GET['seid'] == 2) {
        $data['se'] = 'hase';
        $seId = $_GET['seid'];
    }
    //}}
    //}
    $view = 0;
    if (!empty($_GET['view'])) {
        $view = $_GET['view'];
    }
    $data['view'] = $view;
    //Khac giao dich trai phieu
    //{ Xu ly khung du lieu
    $data['type'] = '.';
    $symbol = '';
    $validSymbol = false;
    if (!empty($_GET['symbol'])) {
        $symbol = $_GET['symbol'];
        if ($view != 3) {
            $data['type'] = '.filter.';
            $data['se'] = 'company';
        }
        $data['url_param'] .= '&symbol=' . $symbol;
        $db1 = _db('stockbiz');
        $db1->query('SELECT c.Symbol, c.CompanyName, i.Name AS IndustryName,Bourse, i.IndustryId
        FROM _prefix_companyinfo c, _prefix_industry i 
        WHERE i.IndustryId = c.IndustryID AND Symbol="' . $symbol . '"');
        if ($info = $db1->fetch()) {
            $data['info'] = $info;
            if ($info['Bourse'] == 'HOSE') {
                $seId = 1;
            } else {
                $seId = 2;
            }
            $validSymbol = true;
            $data['symbol'] = $symbol;
        }
    }
    $data['seid'] = $seId;
    if ($seId == 1) {
        require 'hose.php';
    } else {
        require 'hase.php';
    }
    switch ($view) {
        case 0:
            //Khong co loc
            if ($symbol == '') {
                if ($seId == 1) {
                    $data['hose_current_security'] = get_hcm_security($toDate);
                } else {
                    $data['hase_current_security'] = get_hn_security($toDate);
                }
                //Co loc
            } else {
                if ($validSymbol) {
                    $data['current_security'] = get_hcm_security_filter($symbol, $fromDate, $toDate, $seId);
                }
            }
            break;
        case 1:
            if ($seId == 1) {
                $data['put_through'] = get_hcm_putthrough($symbol, $fromDate, $toDate);
                $data['put_through_info'] = getPutExecInfo_sum($symbol, $fromDate, $toDate);
            } else {
                if ($symbol == '') {
                    $data['put_through'] = get_hn_putthrough($toDate, $data['put_through_qty'], $data['put_through_val']);
                }
            }
            break;
        case 2:
            $result_per_page = 20;
            $data['fi_sum'] = getForeignInvestment_sum($symbol, $fromDate, $toDate, $seId);
            $data['fi_top5bvol'] = getTopFI5BVol($fromDate, $toDate, $seId);
            $data['fi_top5bval'] = getTopFI5BVal($fromDate, $toDate, $seId);
            $data['fi_top5svol'] = getTopFI5SVol($fromDate, $toDate, $seId);
            $data['fi_top5sval'] = getTopFI5SVal($fromDate, $toDate, $seId);
            $data['fi'] = getForeignInvestment($symbol, $fromDate, $toDate, $seId);
            $paging = new Paging('p', $result_per_page, 0, _display_page());
            $paging->sCurrentPageClass = 'current';
            $paging->sPageNextClass = 'next';
            $paging->sPostfix = '#detail';
            $paging->nTotalRow = count($data['fi']);
            $data['fi_offset'] = $paging->getResultRowStart();
            $data['fi_total'] = $data['fi_offset'] + $result_per_page;
            $data['fi_paging'] = $paging;
            /*if ($seId == 1) $data[] = '';
              else $data[] = '';*/
            break;
        case 3:
//.........这里部分代码省略.........
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:101,代码来源:user.securities.php


注:本文中的Paging::getResultRowStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。