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


PHP DataBase::count方法代码示例

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


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

示例1: max

                        <a href="?page=<?php 
echo max(1, $page - 1) . $queryString;
?>
">Anterior</a>
                        <a href="?page=<?php 
echo min($page + 1, $pages) . $queryString;
?>
">Siguiente</a>
                        <a href="?page=<?php 
echo ceil($registros / $nrpp) . $queryString;
?>
">Última</a>
                    </td>
                    <td>
                        <span>Total: <?php 
echo $bd->count("usuario");
?>
</span>
                    </td>
                </tr>
            </tfoot>
            <?php 
foreach ($usuarios as $indice => $usuario) {
    if ($usuario->getAdministrador() !== "1") {
        ?>
            <tr>
                <td><?php 
        echo $usuario->getEmail();
        ?>
</td>
                <td><?php 
开发者ID:carlosgrgr,项目名称:gestionUsuarios,代码行数:31,代码来源:indexPersonal.php

示例2: count

}
/**
 * with access only
 * */
if (!$Auth->isAdmin($_COOKIE['id'], $_COOKIE['hash'])) {
    $_RETURN['errorMsg'] = 'Недостаточно прав!';
    $_RETURN['status'] = -1;
    $_RETURN['data'] = null;
    echo json_encode($_RETURN);
    exit;
}
if ($_GET['core']) {
    $_m = $_GET['core'];
    if ($_m == 'menuList') {
        require_once _ENGINE . 'MenuList.php';
        $array['unread'] = $Db->count('SELECT count(*) FROM reviews WHERE visible = ' . $Db->quote(0));
        $leftNavigation = array(new MenuList('Основное', '#/main/calendar', 'fa-dashboard', 'fa-angle-left pull-right', array(new MenuList('Календарь', '#/main/calendar', 'fa fa-calendar'), new MenuList('Калькулятор', '#/main/calculator', 'fa-calculator'))), new MenuList('Отзывы', '#/reviews', 'fa-commenting-o', 'fa-angle-left pull-right', array(new MenuList('Отзывы', '#/reviews', 'fa-list'))), new MenuList('Пользователи', '#/user/all', 'fa-user', 'fa-angle-left pull-right', array(new MenuList('Все', '#/user/all', 'fa-users'), new MenuList('Добавить', '#/user/add', 'fa-user-plus'))), new MenuList('Галерея', '#/galary/all', 'fa-th', 'fa-angle-left pull-right', array(new MenuList('Все', '#/galary/all', 'fa-photo'), new MenuList('Категории', '#/galary/categories', 'fa-list'), new MenuList('Загрузка', '#/galary/add', 'fa-upload'))));
        $_RETURN['status'] = 1;
        $_RETURN['data'] = $leftNavigation;
        echo json_encode($_RETURN);
    }
    // Список категорий и их итемов для калькуляции
    if ($_m == 'calcCategory') {
        $array = $Db->select('
            SELECT 
                c.id as catId,
                c.name as catName,
                c.image as catImage,
                i.id as iId,
                i.name as iName,
                i.description as iDesc,
开发者ID:bustEXZ,项目名称:AdministrationPanel,代码行数:31,代码来源:ajax.php


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