Jump to content


Photo

archive


  • Please log in to reply
1 reply to this topic

#1 reen

reen
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 17 June 2003 - 10:25 AM

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:1:0f315f339f]<?php
<?php require_once(\'../../Connections/ljbc_connt.php\'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS[\"PHP_SELF\"];
?>

<?php

$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);
?>

?>[/php:1:0f315f339f]
php

#2 ijasont

ijasont
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 18 June 2003 - 02:07 AM

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.

Thanks
Jason Tugman [br]wannabe PHP Game Dev




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users