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


PHP Pagination::getLimitStr方法代码示例

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


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

示例1: COUNT

                            <tr>
                                <th>first name</th>
                                <th>last name</th>
                                <th>email address</th>
                                <th>password</th>
                                <th>phone</th>
                                <th colspan="2">receive ‘yes’ emails?</th>
                            </tr>‌
                            <?php 
$user_count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_USER . " WHERE type='admin'"));
$user_sql = "SELECT u.* FROM " . TBL_USER . " u WHERE u.type='admin' ORDER BY u.id DESC";
$userPagination = new Pagination();
$userPagination->limit = 30;
$userPagination->pageParam = 'user_page';
$userPagination->execute($user_count['total']);
$user_sql .= $userPagination->getLimitStr();
$user_query = mysql_query($user_sql);
while ($user_data = mysql_fetch_assoc($user_query)) {
    ?>
                                <tr>
                                    <td><?php 
    echo $user_data['first_name'];
    ?>
</td>
                                    <td><?php 
    echo $user_data['last_name'];
    ?>
</td>
                                    <td><?php 
    echo $user_data['email'];
    ?>
开发者ID:Dwetech,项目名称:Windowfreak1985,代码行数:31,代码来源:administrator.php

示例2: COUNT

                                                                        <th>first name</th>
                                                                        <th>last name</th>
                                                                        <th>phone number</th>
                                                                        <th>time to call</th>
                                                                        <th>yes/no</th>
                                                                        <th>date/time</th>

                                                                    </tr>
                                                                    <?php 
$count = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM ' . TBL_LEADS . ' WHERE user_id=' . $_SESSION['user_id']));
$leadsSQL = 'SELECT * FROM ' . TBL_LEADS . ' WHERE user_id=' . $_SESSION['user_id'];
$Pagination = new Pagination();
$Pagination->limit = 30;
$Pagination->pageParam = 'page';
$Pagination->execute($count['total']);
$leadsSQL .= $Pagination->getLimitStr();
$leadsQuery = mysql_query($leadsSQL);
while ($leads = mysql_fetch_assoc($leadsQuery)) {
    ?>
                                                                        <tr>
                                                                            <td><?php 
    echo $leads['first_name'];
    ?>
</td>
                                                                            <td><?php 
    echo $leads['last_name'];
    ?>
</td>
                                                                            <td><?php 
    echo $leads['phone_no'];
    ?>
开发者ID:Dwetech,项目名称:Windowfreak1985,代码行数:31,代码来源:view.php

示例3: COUNT

                    <div class="table-responsive">
                        <table class="table table-striped">
                            <tr>
                                <th>file name</th>
                                <th colspan="2">description</th>
                            </tr>

                            <?php 
$bannerQuery = mysql_query("SELECT * FROM " . TBL_BANNER);
$count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_BANNER));
$bannerSQL = 'SELECT * FROM ' . TBL_BANNER;
$Pagination = new Pagination();
$Pagination->limit = 30;
$Pagination->pageParam = 'page';
$Pagination->execute($count['total']);
$bannerSQL .= $Pagination->getLimitStr();
$bannerQuery = mysql_query($bannerSQL);
while ($banner = mysql_fetch_assoc($bannerQuery)) {
    ?>
                                <tr>
                                    <td><?php 
    echo $banner['file_name'];
    ?>
</td>
                                    <td><?php 
    echo $banner['description'];
    ?>
</td>
                                    <td class="text-center"><input type="checkbox" name="id" value="<?php 
    echo $banner['id'];
    ?>
开发者ID:Dwetech,项目名称:Windowfreak1985,代码行数:31,代码来源:banner.php

示例4: COUNT

                            <th>last name</th>
                            <th>phone number</th>
                            <th>time to call</th>
                            <th>yes/no</th>
                            <th>date/time</th>
                            <th>user (first last)</th>
                            <th>agency</th>
                        </tr>
                        <?php 
$leads_count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_LEADS . ""));
$leads_sql = "SELECT\r\n                                        l.*,\r\n                                        u.first_name as user_first_name,\r\n                                        u.last_name as user_last_name,\r\n                                        a.agency_name\r\n                                     FROM\r\n                                        " . TBL_LEADS . " l\r\n                                     LEFT JOIN " . TBL_USER . " u\r\n                                        ON (l.user_id=u.id)\r\n                                     LEFT JOIN " . TBL_AGENCY . " a\r\n                                        ON (u.agency_id=a.id)\r\n                                     ORDER BY l.id DESC";
$leadsPagination = new Pagination();
$leadsPagination->limit = 30;
$leadsPagination->pageParam = 'page';
$leadsPagination->execute($leads_count['total']);
$leads_sql .= $leadsPagination->getLimitStr();
$leads_query = mysql_query($leads_sql);
while ($leads = mysql_fetch_assoc($leads_query)) {
    ?>
                            <tr>
                                <td><?php 
    echo $leads['first_name'];
    ?>
</td>
                                <td><?php 
    echo $leads['last_name'];
    ?>
</td>
                                <td><?php 
    echo $leads['phone_no'];
    ?>
开发者ID:Dwetech,项目名称:Windowfreak1985,代码行数:31,代码来源:dashboard.php

示例5: Form

/**
 * Created by N0B0DY.
 * User: me@suvo.me
 * Date: 9/15/14
 * Time: 1:41 AM
 */
include '../../core.php';
$session->loginRequired('admin');
$form = new Form();
$count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM starter"));
$sql = 'SELECT * FROM starter ORDER BY id DESC';
$pagination = new Pagination();
$pagination->limit = 10;
$pagination->execute($count['total']);
$sql .= $pagination->getLimitStr();
$data = mysql_query($sql);
?>
<a href="../../alex/image_description.php"></a>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Life Department - Starters</title>
        <?php 
include ROOT_DIR . 'include/head.php';
?>
        <script type="text/javascript" src="<?php 
echo JS;
?>
开发者ID:Dwetech,项目名称:Windowfreak1985,代码行数:30,代码来源:starters.php

示例6: COUNT

                        <table class="table table-striped">
                            <tr>
                                <th>Agency name</th>
                                <th>primary contact</th>
                                <th>agency email</th>
                                <th>agency phone </th>
                                <th colspan="2">leads (yes/no)</th>
                            </tr>
                            <?php 
$agency_count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_AGENCY));
$agency_sql = "SELECT * FROM " . TBL_AGENCY . ' ORDER BY id DESC';
$agencyPagination = new Pagination();
$agencyPagination->limit = 30;
$agencyPagination->pageParam = 'agency_page';
$agencyPagination->execute($agency_count['total']);
$agency_sql .= $agencyPagination->getLimitStr();
$agency_query = mysql_query($agency_sql);
if (mysql_num_rows($agency_query) > 0) {
    $lead_count_y['count'] = 0;
    $lead_count_n['count'] = 0;
    while ($data = mysql_fetch_assoc($agency_query)) {
        //Count lead_result
        $lead_count_y = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS count FROM leads WHERE lead_result = 'Y' AND user_id IN(SELECT id FROM user WHERE agency_id = '" . $data['id'] . "')"));
        $lead_count_n = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS count FROM leads WHERE lead_result = 'N' AND user_id IN(SELECT id FROM user WHERE agency_id = '" . $data['id'] . "')"));
        ?>
                                    <tr>
                                        <td><?php 
        echo $data['agency_name'];
        ?>
</td>
                                        <td><?php 
开发者ID:Dwetech,项目名称:Windowfreak1985,代码行数:31,代码来源:user.php


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