Good night guys, I need to link two tables and I can not fix it or find where I'm going wrong.
I have two tables:
Table 1: br_regiao | id - iduf - name - (1, 1, Litoral)
Table 2: br_stat | id - name - (1 - Santa Catarina)
Query: name and iduf field of the br_region table and name / strong> br_region.name
Error: Only shows the field of the table br_estate.name and in the br_regiao.name field nothing appears.
PHP Code
<tbody>
<?php
$query = mysqli_query($_mysqli,"select * from br_regiao inner join br_estado on br_regiao.iduf = br_estado.id order by br_regiao.id desc");
while ($categoria = mysqli_fetch_array($query,MYSQLI_ASSOC)) {
?>
<tr>
<td><?php echo $categoria['id']; ?></td>
<td><?php echo $categoria['br_estado.nome']; ?></td>
<td><?php echo $categoria['br_regiao.nome']; ?></td>
<td>
<a class="btn btn-primary btn-sm show-tooltip" title="Edit" href="<?php echo $URL_ADMIN; ?>regiao.php?id=<?php echo $categoria['.id']; ?>"><i class="fa fa-edit"></i></a>
<a class="btn btn-danger btn-sm show-tooltip" title="Delete" href="<?php echo $URL_ADMIN; ?>regiaoalt.php?id=<?php echo $categoria['id']; ?>"><i class="fa fa-trash-o"></i></a>
</td>
</tr>
<?php
}
?>
</tbody>