本文整理汇总了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;
}
示例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> ";
$last = "{$lLastPostDate}: <strong>{$last_post_date}</strong>";
示例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;