0
Good evening, I’m having trouble that is the following, on the requested page if the user has 1 order or more it displays the request, if the user has no request appears the message "You have no request", or at least should appear. With the code I have so far, when the user has some request appears normally, but when he has not made any request, the message does not appear. I’ll leave my code below.
$result=$conn->query($comando);
$result = mysqli_query($conn, $comando);
if (count($result)>0){
while ($row = mysqli_fetch_assoc($result)){ ?>
<tr>
<th scope="row"><?= $row['order_id'] ?></th>
<td><?= $row['order_date'] ?></td>
<td><?= $row['order_name'] ?></td>
<td><?= $row['order_endereco'] ?></td>
<td><?= $row['order_numero'] ?></td>
<td><?= $row['order_referencia'] ?></td>
<td><?= $row['situacao'] ?></td>
</tr>
<?php } }else{ ?>
<div class="text-center">Você não possui nenhum pedido</div>
<?php } ?>