-1
I am creating a code in html and php where I see the error "mysqli_fetch_assoc() expects Parameter 1 to be mysqli_result, Boolean Given in ", this code will show scores for a minigolf tournament. the code gives me error in the code below.
<?php
if($total){ do {
$query1 = "SELECT nome from jogador WHERE nometeam = ".$linha['nometeam'];
$dados1 = mysqli_query($conn, $query1);
$linha1 = mysqli_fetch_assoc($dados1);
print $query1
?>
It worked but look at the code of the whole table
– ATXtreme
Currently, only one player is presented to me by each team. I wanted to know how to introduce myself to 3 players per team?
– ATXtreme
Do you have 3 registrations (players) in your "team name" table? Because in while there is no restriction/result limit condition, while displays all, if you want to make a limitation you should add after WHERE
nometeam
= '".$line['nometeam']." ' LIMIT 3, for example.– ElvisP
yes, I have 3 players for 3 tables
– ATXtreme
If they are separate tables you should make the same code for each table, which is not recommended, the most correct would be for you to insert all players in the same table and differentiating only the type name with a "teamname" column, for example.
– ElvisP
the name of the teams and the name of the players are on the same table(player table)
– ATXtreme
In the answer presented by me, the code will display all, maybe it is some limitation imposed on your code, because in the query I did not insert any limitation on the quantities of record to display.
– ElvisP
Check, changed the code (my answer) to display the team name and player with the code of your table, made a semantic change, gives a check. Note that I also added the name of the "team" column in the query, adapt the name of your column to the "team name".
– ElvisP
I checked and have no limitations on my code
– ATXtreme
Have you checked up on the change I made in my reply? Test in your development environment and then reply here.
– ElvisP
I checked and gave nothing even
– ATXtreme