i keep getting this error: Fatal error: Call to a member function fetch_assoc() on a non-object
and non of the other answers for this issue you will solve my issue. any idea what the problem is here?
<?
$link = mysqli_connect("localhost","","","mysql");
$data = 'SELECT * FROM `league_quiz` ORDER BY score';
$result = $link->query($data);
while( $row = $result->fetch_assoc()){
echo $row['leaguename'] . " " . $row['quizscore'];
echo "<br/>";
}
$link->close ();
?>