Witam po wykonaniu skryptu perser zwraca mi nastepujacy komunikat bledu
Cytat
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\webserv\www\public_html\helpdesk\index.php on line 120
a linia tego kodu to:
<table width="400" border="0" cellpadding="5" align="center">
<tr><td>
<hr align="right" size="1" width="400" noshade>
</td></tr>
<?
?> <tr><td> <?
if($last_date == $row["date"]): ?>
<p><b>
<? echo $row["time"] ?></b>
<?else:?>
<p>
<? echo $row["time"]?> - <b>
<? echo $row["date"]?></b>
<?endif;
$cat_num = $row["category_id"];
$cat_result = mysql_query("select categories.category from helpdesk, categories where helpdesk.categor
y_id = categories.category_id and helpdesk.category_id = '$cat_num'"); ?>
<br>Kategoria: <i>
<? echo $cat["category"] ?></i>
<p>
<? echo "<b>".$row["title"]."</b>n" ?> <p>
<? echo $row["intro"] ?><br>
<?
printf("n<p><a href="index
.php?more
=%s
">[<i>Rozwiązanie Problemu</i>]</a>n", $row["news_id"]); printf("n <a href="index
.php?add_comment
=%s
"><i>Dodaj komentarz</i></a>n", $row["news_id"]); $last_date = $row["date"];
?>
<hr align="right" size="1" width="400" noshade>
</td></tr>
<?
}
?> </table> <?
Nie wiem co jest nie tak wczesniej stosowany mysql_fetch_array() np:
<?php
}
function enter_post($author, $password, $title, $intro, $more, $category) {
connect();
$sql = "select * from authors where author_name = '$author'";
if($row["author_password"] !=$password):
print("<h1>Podane hasło jest nieprawidłowe</h1>"); else:
$author = $row["author_id"];
$sql = "insert into helpdesk VALUES(NULL,'$title','$intro','$more','$author','$category','$date','$time')";
endif;
}
?>
i kod wykonywany jest pomyslnie Moglbym prosic o pomoc w miare mozliwosci