I have a problem when extracting a data in mysql through PHP.
I have a database with two tables related to each other, the users table is related to its "Id" with another table called content in the "creator" section. What I am looking for is to extract from the users table another piece of data called "user", which would be the name in relation to the id, but I can only extract the id, that is, the identification number and not the name.
Here I leave my code.
<?php
include("apartadosPhp/conexion_bd.php");
$query = "SELECT * FROM contenido ORDER BY fecha DESC";
$resultado = $conexion -> query($query);
while ($row = $resultado->fetch_assoc()){
?>
<div>
<div class="img">
<img class="imgEntrada" src="img/entradas/<?php echo $row ['Img']?>" alt="imgEntrada">
</div>
<div class="detalles">
<h3><?php echo $row['Titulo'] ?></h3>
<h4 class="creador"> <?php echo $row['creador'] ?> </h4>
</div>
</div>
<?php
}
?>
At the time of putting, $row['creador']
it prints the ID of the user who registered the input, but I want to extract the name, not the id.