Good morning guys, I have this query
$query = "SELECT p.*, c.nomeCategoria AS categoria FROM produto AS p INNER JOIN produto_categoria AS c";
$dados = mysqli_query($con, $query) or die(mysqli_error());
and a while that returns the value inside a select.
<select name="categoriaProduto">
<?php
while($row = mysqli_fetch_array($dados))
{
?>
<option value="<?php echo $row["categoria"]; ?>"><?php echo $row["categoria"]; ?></option>
<?php
}
?>
</select>
In my page it's showing the duplicate select data, I have 3 items registered in the category_product table.
I wanted to know if there was anything I did wrong in the code. Thank you!!