1
Hello, I’m having a problem with returning a Mysql query.
I make a query that makes a SELECT Count of a field in a database. The problem is when I will display the return of the query in HTML, it returns me this error.
<?php
$select_pendentes = "SELECT count(codigo) from tbl_atividades WHERE STATUS = 'PENDENTE' AND RESPONSAVEL = 'BRUNO' AND month(DT_VENCIMENTO) = month(now())";
$lista_pendentes = mysqli_query($conecta, $select_pendentes);
if(!$lista_pendentes)
{
die("Erro no Banco - CONTAR ATIVIDADES PENDENTES");
}
?>
<!-- EXIBIÇÃO NO HTML -->
<div class="col-lg-10 col-lg-offset-2" id="resultados-dashboard">
<div class="col-lg-2 .relatorios" id="resultados-pendentes">
<h1><?php echo $lista_pendentes; ?></h1>
<p>Pendentes</p>
</div>
Bug Image
The problem only happens with the query. If I add a value or text in the $pending list variable, it is normally displayed in HTML.
The result of the query in the Mysql console happens normally. See below:
Good, Marcos. The interesting thing is that we study this, but the lack of practice makes us forget much of what we don’t use. I was working with Front-End, and I forgot a lot about the back.
– Gato de Schrödinger
It’s part kkkkk
– Marcos Souza