當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。