mam taki kod :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="Stylesheet" type="text/css" href="style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
<title>Mer press test</title>
</head>
<body>
<? include "mysql.php";
require_once('Pager.class.php');
connection();
$query="select * FROM `artykuly` ORDER BY `id`";
//pager
$sql = 'select count(*) from `artykuly`';
$recordsCount = $row[0];//pobranie liczby rekordów
try{
$pager = new Pager('idPagera');
$pager->SetTotalRecords($recordsCount);
$pager->Make(true);
$pag = $pager->Render();
$start = $pager->GetIndexRecordStart();
$end = $pager->GetIndexRecordEnd();
}
catch (Exception $e) {
}
?>
<div class="art" >
<h1>
<?echo $row['tytul'];?></h1>
<br>
<h3>
<? echo $row['data'] ?></h3>
<br>
<br><br>
<?echo $row['artykul'];?> </div>
<br><br><br>
<?}
//zapytanie z uwzglenieniem stronicowania
$sql = 'select * from `artykuly` limit '.$start.','.($end - $start + 1);
//...pobranie wyników i ich wyswietlenie
echo $pag;//wyswietlenie pager'a?> </body>
</html>
czemu niebangla ? tzn pager niestornicuje wszystko sie powtarza na każdej stronie
Ten post edytował meron11 24.06.2010, 20:47:05