helo
pleas help me.
Third error is displayed on the my web
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in view_express_ad.php on line 635
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in view_express_ad.php on line 645
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in view_express_ad.php on line 659
These three lines are within a function ((function get_groups in view_express_ad.php ))
function get_groups Code:
Code:
function get_groups()
{
$id = $_GET['id'];
$query = "SELECT * FROM express_ads WHERE ID=$id";
$result = mysql_query($query);
$row = mysql_fetch_array($result); *****line 635******
$sgid = $row['GroupID'];
$query = "SELECT * FROM groups WHERE ID=$sgid";
$result = mysql_query($query);
$row = mysql_fetch_array($result); *****line 645******
$parentid = $row['ParentID'];
$query = "SELECT * FROM groups WHERE ParentID=$parentid";
$result = mysql_query($query);
$groups_html .= "<p align=\"right\"><ul>";
while (($row = mysql_fetch_array($result))) *****line 659******
{
$name = $row['Name'];
$id = $row['ID'];
if ($id == $sgid)
$bgcolor = "background-color: #ffddbb";
else
$bgcolor = "";
$groups_html .= "<li style=\"$bgcolor\"><a href=\"sub_group.php?id=$id\">$name</a></li>";
}
$groups_html .= "</ul></p>";
return $groups_html;
}
Please guide me,
Regards,
Sara,