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


PHP query::numrows方法代码示例

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


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

示例1: query

$msg_list = new query($DB, $sSQL);
$row = $msg_list->firstrow();
if (is_array($row)) {
    if (!$read) {
        $rec = $thread_list->firstrow();
        while (is_array($rec)) {
            $thd = $rec["thread"];
            if (!isset($rec["tcount"])) {
                $rec["tcount"] = 0;
            }
            $tcount = $rec["tcount"];
            $threadtotal[$thd] = $tcount;
            $rec = $thread_list->getrow();
        }
    } else {
        $threadtotal[$thread] = $msg_list->numrows();
    }
    $topics["max"] = "0";
    $topics["min"] = "0";
    while (is_array($row)) {
        $x = "" . $row["id"] . "";
        $p = "" . $row["parent"] . "";
        $messages["{$x}"] = $row;
        $messages["{$p}"]["replies"]["{$x}"] = "{$x}";
        $messages["{$p}"]["max"] = $row["id"];
        if (!isset($messages["max"])) {
            $messages["max"] = 0;
        }
        if (!isset($messages["min"])) {
            $messages["min"] = 0;
        }
开发者ID:carriercomm,项目名称:Exult,代码行数:31,代码来源:easyadmin.php

示例2: while

    }
    $q->query($DB, $sSQL);
    $rec = $q->getrow();
} else {
    $rec = "";
}
if (is_array($rec)) {
    while (is_array($rec)) {
        $empty = false;
        $name = $rec["name"];
        $num = $rec["id"];
        $description = $rec["description"];
        if (!$rec["folder"]) {
            $sSQL = "select count(*) as posts from {$rec['table_name']} where approved='Y'";
            $tq = new query($DB, $sSQL);
            if ($tq->numrows()) {
                $trec = $tq->getrow();
                $num_posts = $trec["posts"];
            } else {
                $num_posts = '0';
            }
            $sSQL = "select max(datestamp) as max_date from {$rec['table_name']} where approved='Y'";
            $tq->query($DB, $sSQL);
            $trec = $tq->getrow();
            if (empty($trec["max_date"])) {
                $last_post_date = "";
            } else {
                $last_post_date = phorum_date_format($trec["max_date"]);
            }
            $posts = "{$lNumPosts}: <strong>{$num_posts}</strong>&nbsp;&nbsp;";
            $last = "{$lLastPostDate}: <strong>{$last_post_date}</strong>";
开发者ID:carriercomm,项目名称:Exult,代码行数:31,代码来源:index.php

示例3: query

            }
            break;
        case 1:
            $cutoff_thread = $thread + $cutoff;
            if ($ForumMultiLevel == 2) {
                $sSQL = "select thread, id from {$ForumTableName} where modifystamp>{$thms} {$limitApproved} order by modifystamp {$limit}";
            } else {
                $sSQL = "Select thread, id from {$ForumTableName} where thread<{$cutoff_thread} and thread>{$thread} and id=thread {$limitApproved} order by thread asc {$limit}";
            }
            break;
    }
    $msg = new query($DB, $sSQL);
    if ($DB->type == "postgresql") {
        $q->query($DB, "set QUERY_LIMIT TO '0'");
    }
    if ($msg->numrows() == 0) {
        Header("Location: {$list_page}.{$ext}?f={$num}{$GetVars}");
        exit;
    }
    $tres = $msg->getrow();
    Header("Location: {$read_page}.{$ext}?f={$num}&i={$tres['id']}&t={$tres['thread']}{$GetVars}");
    exit;
}
$sSQL = "Select * from {$ForumTableName} where thread={$thread} {$limitApproved} order by id";
$msg_list = new query($DB, $sSQL);
$rec = $msg_list->getrow();
$x = 0;
while (is_array($rec)) {
    $headers[] = $rec;
    if ($rec["id"] == $id) {
        $loc = $x;
开发者ID:carriercomm,项目名称:xmec,代码行数:31,代码来源:read.php


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