With this function I create the search for my earrings.
function pendientesporrevisar($conexion){
$pendientes = (mysqli_query($conexion, "SELECT COUNT(*) AS conteo FROM ticket WHERE tipo_solicitud = 1 && status = 1 ")) or die("Error mostrando tickets pendientes: ".mysqli_error($conexion));
$resultados = mysqli_fetch_row($pendientes);
return $resultados[0];
}
I then import it into my html and show it like this
<div align="" class="">PENDIENTES:<?php echo '<div class="notificacion">', $ticket->pendientesporrevisar($conexion),'</div>'; ?></div>
How can I show the number only if it is greater than 0? I mean, do not show me a 0.