pewna stronka została przeniesiona na inny serwer.
W plikach ustawiona została nowa baza danych , ale wyskakuje na stronie taki komunikat:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ergraf/public_html/inc/splash.php on line 114
kod pliku:
Kod
if (ISSET($_GET['news'])) $akcja=($_GET['news']);
global $db,$dzial;
$query = "SELECT id,DATE_FORMAT(postdate, '%Y-%m-%d') as date,title,newstext,imgname FROM ergraf ORDER BY id DESC LIMIT 1";
$result = mysql_query ($query);
//linia 114 while ($row = mysql_fetch_assoc ($result)) {
$date = $row['date'];
$title = ($row['title']);
$news = nl2br (strip_tags ($row['newstext'], '<a><b><i><u>'));
$news_id = $row['id'];
$imgname = $row['imgname'];
echo "\n<!--news-->\n";
echo(" <b>$title</b>");
echo("</td></tr><tr><td>");
echo("<img src=\"gfx/5_05.jpg\" width=\"198\" height=\"17\" alt=\"\">");
echo("</td></tr>");
echo("<tr><td style=\"background-image: url(gfx/5_06.jpg);width:198px;height:170px;\" class=\"news2\">");
if(!empty($imgname)) echo("<img src=\"pics/news/$imgname\" align=\"left\" border=1>");
if (strlen($news)>290)
{
$news=substr($news, 0, 290);
$news .= '<font color=#696969> (...)</font>';
}
echo("$news");
}
global $db,$dzial;
$query = "SELECT id,DATE_FORMAT(postdate, '%Y-%m-%d') as date,title,newstext,imgname FROM ergraf ORDER BY id DESC LIMIT 1";
$result = mysql_query ($query);
//linia 114 while ($row = mysql_fetch_assoc ($result)) {
$date = $row['date'];
$title = ($row['title']);
$news = nl2br (strip_tags ($row['newstext'], '<a><b><i><u>'));
$news_id = $row['id'];
$imgname = $row['imgname'];
echo "\n<!--news-->\n";
echo(" <b>$title</b>");
echo("</td></tr><tr><td>");
echo("<img src=\"gfx/5_05.jpg\" width=\"198\" height=\"17\" alt=\"\">");
echo("</td></tr>");
echo("<tr><td style=\"background-image: url(gfx/5_06.jpg);width:198px;height:170px;\" class=\"news2\">");
if(!empty($imgname)) echo("<img src=\"pics/news/$imgname\" align=\"left\" border=1>");
if (strlen($news)>290)
{
$news=substr($news, 0, 290);
$news .= '<font color=#696969> (...)</font>';
}
echo("$news");
}
nie ja robiłam tą stronkę, próbuje tylko pomóc pewniej osobie
czy możecie mi podpowiedzieć cokolwiek? potrzebujecie więcej informacji?