reen Posted June 17, 2003 Share Posted June 17, 2003 how can i great archive ? 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] Quote Link to comment https://forums.phpfreaks.com/topic/604-archive/ Share on other sites More sharing options...
ijasont Posted June 18, 2003 Share Posted June 18, 2003 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 Quote Link to comment https://forums.phpfreaks.com/topic/604-archive/#findComment-2031 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.