Forum Moderators: coopster
Here is the code.
<?
$maxRows_rslatestnews = 17;
$pageNum_rslatestnews = 0;
if (isset($_GET['pageNum_rslatestnews'])) {
$pageNum_rslatestnews = $_GET['pageNum_rslatestnews'];
}
$startRow_rslatestnews = $pageNum_rslatestnews * $maxRows_rslatestnews;
mysql_select_db($database_connection, $connection);
$query_rslatestnews = "SELECT * FROM news_article_art INNER JOIN news_topic_top ON idtop_art=id_top WHERE idtop_art = '1' ORDER BY date_art DESC";
$query_limit_rslatestnews = sprintf("%s LIMIT %d, %d", $query_rslatestnews, $startRow_rslatestnews, $maxRows_rslatestnews);
$rslatestnews = mysql_query($query_limit_rslatestnews, $connection) or die(mysql_error());
$row_rslatestnews = mysql_fetch_assoc($rslatestnews);
if (isset($_GET['totalRows_rslatestnews'])) {
$totalRows_rslatestnews = $_GET['totalRows_rslatestnews'];
} else {
$all_rslatestnews = mysql_query($query_rslatestnews);
$totalRows_rslatestnews = mysql_num_rows($all_rslatestnews);
}
$totalPages_rslatestnews = ceil($totalRows_rslatestnews/$maxRows_rslatestnews)-1;
?>
<?php do {?>
<?php echo $row_rslatestnews['title_art'];?>
<?php } while ($row_rslatestnews = mysql_fetch_assoc($rslatestnews));?>
<?
mysql_free_result($rslatestnews);
<?
This is printing all my records.What i required is to be diplayed from 5th record onwards ie, 5- 50 records should be displayed.How can i do like that please suggest.
Is that what you are looking for?