$con = mysql_connect("localhost","teachms_fooduse","science0");
if (!$con)
  die('Could not connect: ' . mysql_error());

mysql_select_db("teachms_foods", $con);

$result = mysql_query("SELECT * FROM Foods");

echo "<table border='1'>

while($row = mysql_fetch_array($result))
  echo "<tr>";
  echo "<td>" . $row['Name'] . "</td>";
  echo "<td>" . $row['Shop'] . "</td>";
  echo "<td>" . $row['Price] . "</td>";
  echo "</tr>";
echo "</table>";


Here is my code, i keep getting the error, it does connect to the database, but throws up this: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource-What is it? Can someone fix it please