Php 限制页面上查看的线程数
在论坛中,有一个选项可以选择显示单个页面上可查看的线程数,还有一些链接可以查看下一个包含相同线程数的页面。我想了解在mysql和php中是如何做到这一点的。约会并付钱给我!我会的。Php 限制页面上查看的线程数,php,mysql,Php,Mysql,在论坛中,有一个选项可以选择显示单个页面上可查看的线程数,还有一些链接可以查看下一个包含相同线程数的页面。我想了解在mysql和php中是如何做到这一点的。约会并付钱给我!我会的。 <? $max_results=30; $current_start = $_REQUEST['step']; // put and get from query string via hidden , or other html field. $query = mysql_query(
<?
$max_results=30;
$current_start = $_REQUEST['step']; // put and get from query string via hidden , or other html field.
$query = mysql_query("SELECT * FROM posts LIMIT $current_start,$max_results");
while($row = mysql_fetch_array($query))
{
.....
}
$current_start+=$max_results;
?>
......
<input type="hidden" name="step" value="<?=$current_start;?>">
......
......