Jump to content


This topic is now archived and is closed to further replies.



Recommended Posts

how can i great archive ? :cry:

i work this but my frind he said but 10 before recordset because limeded

but i cant inderstant.

if you can help me please do.


<?php require_once(\'../../Connections/ljbc_connt.php\'); ?>


$currentPage = $HTTP_SERVER_VARS[\"PHP_SELF\"];





$maxRows_archive = 4;

$pageNum_archive = 0;

if (isset($HTTP_GET_VARS[\'pageNum_archive\'])) {

$pageNum_archive = $HTTP_GET_VARS[\'pageNum_archive\'];


$startRow_archive = 10 + $pageNum_archive * $maxRows_archive;

mysql_select_db($database_ljbc_connt, $ljbc_connt);

$query_archive = \"SELECT * FROM sport_news WHERE sport_news.active_fg =\'Y\' ORDER BY sport_news.news_id DESC\";

$query_limit_archive = sprintf(\"%s LIMIT %d, %d\", $query_archive, $startRow_archive, $maxRows_archive);

$archive = mysql_query($query_limit_archive, $ljbc_connt) or die(mysql_error());

$row_archive = mysql_fetch_assoc($archive);


if (isset($HTTP_GET_VARS[\'totalRows_archive\'])) {

$totalRows_archive = $HTTP_GET_VARS[\'totalRows_archive\'];

} else {

$all_archive = mysql_query($query_archive);

$totalRows_archive = mysql_num_rows($all_archive)-10;


$totalPages_archive = ceil($totalRows_archive/$maxRows_archive)-1;


$queryString_archive = \"\";

if (!empty($HTTP_SERVER_VARS[\'QUERY_STRING\'])) {

$params = explode(\"&\", $HTTP_SERVER_VARS[\'QUERY_STRING\']);

$newParams = array();

foreach ($params as $param) {

if (stristr($param, \"pageNum_archive\") == false &&

stristr($param, \"totalRows_archive\") == false) {

array_push($newParams, $param);



if (count($newParams) != 0) {

$queryString_archive = \"&\" . implode(\"&\", $newParams);



$queryString_archive = sprintf(\"&totalRows_archive=%d%s\", $totalRows_archive, $queryString_archive);




Share this post

Link to post
Share on other sites

Please do not take this as a flame. I am truely trying to help here.


I simply do not understand you. If your English is not great you may be able to post in your native language as we are an international crowd. If you are English (American, Canadian, UK) Please re-read your post as I cannot make out what you are trying to say.



Share this post

Link to post
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.