Jump to content

reen

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Contact Methods

  • Yahoo
    nansi_moslema80@yahoo.com

reen's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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]
×
×
  • 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.