Mam problem....mam strankovani a pise me to chybu s mysql_fetch_array....posilam i zdrojak
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;windows-1250">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<meta name="GENERATOR" content="PSPad">
<meta name="webdesign" content="Turbo-Snek">
<meta name="code" content="Turbo-Snek">
<link href="styl.css" rel="stylesheet" type="text/css" />
<TITLE>Úkol k lekci číslo 1</TITLE>
</HEAD>
<BODY>
<?php
$connect=mysql_connect("localhost", "root", "vertrigo") or die ("Chyba ! Pripojenie k serveru zlyhalo !");
$database=mysql_select_db(news) or die ("Chyba! Pripojenie do databázy zlyhalo !");
$RecordsPerPage = 2;
$TotalRecords=mysql_result(mysql_query("SELECT COUNT(*) FROM novinky"),0);
$maxPage = ceil($TotalRecords/$RecordsPerPage);
$PageNum=1;
if(isset($_GET["page"]))
{
$PageNum=$_GET["page"];
}
$self = $_SERVER['PHP_SELF'];
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $PageNum)
{
$nav .= " $page ";
}
else
{
$nav .= " <a href=\"$self?page=$page\">$page</a> ";
}
}
if(!is_numeric($PageNum))
{
include("zobraz.php");
}
else if ($PageNum > $maxPage)
{ echo "sss";
}
else
{
$offset=($PageNum - 1)*$RecordsPerPage;
$result=mysql_query("SELECT * FROM novinky ORDER BY ID DESC LIMIT $offset, $RecordsPerPage");
while($zaznam= mysql_fetch_array($result))
{
$autor=$zaznam["autor"];
$datum=$zaznam["datum"];
$nadpis=$zaznam["nadpis"];
$text=$zaznam["text"];
echo "$autor<br>";
echo "$datum<br>";
echo "$nadpis<br>";
echo "$text<br><hr />";
}
echo $nav;
}
mysql_close($connect);
?>
?>
</BODY>
</HTML>
a toto mi to pise
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Documents and Settings\Turb0-Sn3k\Programky\VertrigoServ\www\news\index.php on line 56