why am i getting this error with mysql_fetch_assoc? ?
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mediatec/public_html/jrknowles/dow/assignment1/includes/login.php on line 29
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/mediatec/public_html/jrknowles/dow/assignment1/includes/login.php on line 45
[code=php]
echo “<h1>Current Members</h1>”;
echo “<table>”;
$filter = “user_id”;
$query = “SELECT * FROM assi1”;
/*$query .= “ORDER BY $filter DESC”;*/
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result))
{
echo “<tr>”;
echo “<td>” . $row[‘user_id’] . “</td>”;
echo “<td>” . $row[‘title’] . “</td>”;
echo “<td>” . $row[‘first_name’] . “</td>”;
echo “<td>” . $row[‘last_name’] . “</td>”;
echo “<td>” . $row[’email’] . “</td>”;
echo “<td>” . $row[‘house_number’] . “</td>”;
echo “<td>” . $row[‘street’] . “</td>”;
echo “<td>” . $row[‘city’] . “</td>”;
echo “<td>” . $row[‘county’] . “</td>”;
echo “<td>” . $row[‘postcode’] . “</td>”;
echo “<td>” . $row[‘country’] . “</td>”;
echo “</tr>”;
}
mysql_free_result($result);
echo “</table>”;