本文整理汇总了PHP中paging::setTotalPages方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::setTotalPages方法的具体用法?PHP paging::setTotalPages怎么用?PHP paging::setTotalPages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paging
的用法示例。
在下文中一共展示了paging::setTotalPages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
if ($_REQUEST['srtby']) {
$sort = $_REQUEST['srtby'];
if ($sort == 1) {
$appquery .= " ORDER BY totalprice DESC";
} elseif ($sort == 2) {
$appquery .= " ORDER BY totalprice ASC";
} elseif ($sort == 3) {
$appquery .= " ORDER BY totalturntime ASC";
}
}
if (!$_REQUEST['srtby']) {
$appquery .= " ORDER BY U.`user_artist_priority` ASC";
}
$rs_artists = mysql_query($appquery);
$num = mysql_num_rows($rs_artists);
$sku_count = $pagination_object->setTotalPages($num);
if ($sku_count <= $pagenum) {
$pagenum = $pagination_object->setPageNumber($totalpages - 1);
}
$startrow = $pagination_object->setStartRow();
$appquery .= " LIMIT {$startrow},{$maxrows}";
$rs_artists = mysql_query($appquery);
?>
<link rel="stylesheet" type="text/css" href="styles/highslide.css" />
<script type="text/javascript" src="javascripts/highslide-with-html.js"></script>
<script type="text/javascript" src="javascripts/highslide-full.js"></script>
<script type="text/javascript">
hs.graphicsDir = 'images/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];