I have a table where the structure is as follows:
IDEstoques | Product IDs | Sizes | Colors | Stocks
In it storing the sizes, colors and stocks of each product. However I need to bring the following information from the database:
Tamanhos: P,M, G
Cores: Azul, Amarelo, Vermelho
I was able to bring only the sizes as follows:
$sqlEstoques = mysqli_query($this->conexao,"SELECT * FROM loja_estoques WHERE IDProdutos = '".$jmBusca->IDProdutos."';");
if(mysqli_num_rows($sqlEstoques) > 0){
$resultado = array();
while($jmEstoques = mysqli_fetch_array($sqlEstoques)){
$resultado[] = $jmEstoques["Tamanho"];
}
$visualizar .= "<div class='col-lg-12' style='font-size: 14px; text-align: left'><strong>Tamanhos:</strong>". implode(",",$resultado);
$visualizar .= "</div>";
}
Saída: Tamanho: P,M,G
How would I do to bring the colors too?
Cores: Azul, Amarelo, Vermelho