I would like to know how to display the first image of my MySQL table?
I used a dynamic input file, so I can have multiple names saved in a single table that in this case is the image. However, I'd like to know how I display only the first one?
The names in the DB are separated by ;
<div class="lista-prod col-lg-12 ">
<?php
$verificaQuery = mysqli_query($conexao,"select * from produtos");
$verificaRow = mysqli_num_rows($verificaQuery);
if ($verificaCount = 0) {
} else {
$contProd=0;
while ($contSql = mysqli_fetch_array($verificaQuery)) {
$contProd++;
?>
<div class="row mt-5">
<div class="col-lg-4">
<img src="../imagens/produtos/<?php echo $contSql['imagem']; ?>" style="width:100%;">
</div>
If I register only one image, it appears normally, but if I register more, it disappears. To summarize, I have a product page, the first image is the one that gets sample if the person opens the product, displays the other photos on the side, how do I control this?