After fixing my main MySQL error, I now that a problem with the PHP on the website that includes the MySQL table I created. I am receiving the text:
Website link directly to error
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/26/10406626/html/highscore/index.php on line 258
This is where I have $result in the file:
if ($skill == "Attack" || $skill == "Defence" || $skill == "Strength" || $skill == "Hitpoints" || $skill == "Range" || $skill == "Prayer" || $skill == "Magic" || $skill == "Cooking" || $skill == "Woodcutting" || $skill == "Fletching" || $skill == "Fishing" || $skill == "Firemaking" || $skill == "Crafting" || $skill == "Smithing" || $skill == "Mining" || $skill == "Herblore" || $skill == "Agility" || $skill == "Thieving" || $skill == "Slayer" || $skill == "Farming" || $skill == "Runecraft" || $skill == "Hunter" || $skill == "Construction" || $skill == "Summoning" || $skill == "Dungeoneering") {
mysql_select_db("scores", $con);
$result = mysql_query("SELECT * FROM skills WHERE ". $PLAYERS_TO_NOT_SHOW . " ORDER BY " . $skill . "lvl DESC, " . $skill . "xp DESC");
}
else {
$skill = "";
mysql_select_db("scores", $con);
$result = mysql_query("SELECT * FROM skillsoverall WHERE ". $PLAYERS_TO_NOT_SHOW . " ORDER BY lvl DESC, xp DESC");
}
This is line 254 to 278: Obviously, line 258 is *while($row = mysql_fetch_array($result))*
<?php
$rank = 1;
while($row = mysql_fetch_array($result))
{
echo "<a name=\"" . $rank . "\"></a>";
echo "<a class=\"row\">";
echo "<span class=\"columnRank\">";
echo "<span>" . $rank . "</span>";
echo "</span>";
echo "<span class=\"columnName\">";
echo "<span>" . $row['playerName'] . "</span>";
echo "</span>";
echo "<span class=\"columnLevel\">";
echo "<span>" . $row[$skill . 'lvl'] . "</span>";
echo "</span>";
echo "<span class=\"columnXp\">";
echo "<span>" . $row[$skill . 'xp'] . "</span>";
echo "</span>";
echo "</a>";
$rank++;
}
mysql_close($con);
?>