0
$hoje = date('d');
$data_hoje = "SELECT * FROM vendas WHERE dataCompra = now()";
$result = mysqli_query($conexao, $data_hoje);
while($linha = mysqli_fetch_assoc($result)){
if($linha['dataCompra'] == $data_hoje){
$hoje++;
}
}
I’m doing a search in the mysql table to pick up and count all today’s sales to later insert this in a chart, but I can’t print anything. can help me?
I believe you can take the
if($linha['dataCompra'] == $data_hoje){
because you already made the filter in the query. I don’t know if the query is right.– David
If I take the if, it will not count to show it on google Chart...
– Diego Fernando
and leave only the counter?
– David
without success.. the way I did, it returns on the chart only today’s date 26, but it does not search in the comic how many sales were made today ..
– Diego Fernando