0
Hello, I am developing a management system of camepeonatos online (Fifa, pes) and I have a problem, now I am doing the part where the user will post the result of the game, informing the score and the players who made the goals, for this I need to access the database and select the list of players of the user’s club and put them on a button in the form of select so click pro user, I’m beginner would like to know how I do this, with which function, follow example of my code where I was able to get the BD data
<?php
$link = mysqli_connect("localhost", "root", "usbw", "mith");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "
SELECT C.nome_clube , J.nome_jogador
FROM clube as C
RIGHT OUTER JOIN conta_user as UC ON C.id_clube = UC.id_conta
RIGHT OUTER JOIN jogador as J ON C.id_clube = J.id_jogador";
if ($result = mysqli_query($link, $query)) {
/* fetch associative array */
while ($row = mysqli_fetch_assoc($result)) {
printf ("%s (%s)\n", $row["nome_clube"], $row["nome_jogador"]);
}
/* free result set */
mysqli_free_result($result);
}
/* close connection */
mysqli_close($link);
?>
Thank you, sorry if I was not clear on the question I am beginner still my first project, but thank you was that same ;)
– Lucas Rodrigues