I try to get the 5 most-watched Movies from my database and echo the output. Below are some of the related lines:
$sqlGetTop5 = "SELECT TVSeries_ID,COUNT(TVSeries_ID) AS Frequency FROM TVSeries_Watched GROUP BY TVSeries_ID ORDER BY Frequency DESC LIMIT 5";
$ResultGetTop5 = $DBConnect->query($sqlGetTop5);
while($row = $ResultGetTop5->mysqli_fetch_array()){
echo $row['Frequency'];
}
But when I execute the query, "Fatal error: Uncaught Error: Call to undefined method mysqli_result::mysqli_fetch_array() in..." has occurred. I have no idea how to solve it. What is the problem and how to solve this issue?