Mam taki skrypt
<?php
require_once ('connection.php');
$uchwyt = connection();
$content = '';
$NewsPerPage = 5;
$sql = 'select count(*) from item';
$recordsCount = $row[0];// pobranie ilości rekordów
if(!isset($_GET['page'])) { $Page = 1;
$start = 0;
$end = $NewsPerPage;
$link = mysql_query("SELECT * FROM item order by pubDate LIMIT $start,$end"); }
else {
$Page = $_GET['page'];
$start = ($Page - 1) * $NewsPerPage;
$end = $NewsPerPage;
$link = mysql_query("SELECT * FROM item order by pubDate LIMIT $start,$end"); }
if ($recordsCount != 0) {
$content .= '<div id="news">
<div id="news_title">'.stripslashes($wiersz['title']).'</div> <div id="news_content"><br/>'.stripslashes($wiersz['description']).'<br/><br/> <span id="data">Dodano: '.stripslashes($wiersz['pubDate']).'</span></div> <div id="news_foot"></div></div><br/>';
}
$pageCount = ceil($recordsCount/$NewsPerPage); if($pageCount != 1) {
$content .= '<div id="pager">';
for($i=1; $i<=$pageCount; $i++) {
if ($i = $Page) {
$content .= '['.$i.'] ';
}
else {
$content .= '<a href="?id=news&page='.$i.'">['.$i.']</a> ';
}
}
$content .= '</div>';
}
else {
$content .= '';
}
}
else {
$content .= 'Na razie nie ma żadnych newsów';
}
return $content;
?>
Pobiera newsy z bazy danych i je stronicuje. Lecz wyskakuje błąd
Fatal error: Maximum execution time of 60 seconds exceeded in (sciezka) on line 35