A
Anonymous
Guest
So I learning mysql and I tried to learn myslqi, and now I am getting error messages.
HP Fatal error: Uncaught Error: Cannot use object of type mysqli_result as array
I have the following code
The error message is coming from the start of the while loop. I think this is something fairly simple but I can't seem to figure it out.
HP Fatal error: Uncaught Error: Cannot use object of type mysqli_result as array
I have the following code
Code:
$getUserInformation = "select Player_number, Player_First_Name, Player_Last_Name, Player_name, Player_ID FROM players where Player_ID = '$myusername'";
$getInfo = mysqli_query($link, $getUserInformation) or die(mysqli_error($link));
while($row = mysqli_fetch_array($getInfo))
{
$number = $getInfo['Player_number'];
$fName = $getInfo['Player_First_Name'];
$lName = $getInfo['Player_Last_Name'];
$Name = $getInfo['Player_Name'];
}
The error message is coming from the start of the while loop. I think this is something fairly simple but I can't seem to figure it out.