0
error started to appear
PHP Fatal error: [] Operator not supported for strings in
$data = date('Y-m-d');
$q = mysqli_query($con, "SELECT * FROM agendasalao WHERE dataReserva >= $data ORDER BY dataReserva ASC");
$qtde_registros = mysqli_num_rows($q);
if ($qtde_registros > 0) {
while ($row = mysqli_fetch_object($q)){
$data[] = $row; <<< erro aqui
}
echo json_encode($data);
}
puts... this variable ta wrong even. silly error. I will change to $dateAtual .
– Ezequiel Tavares
Just one detail, building queries using the joker *, is a bad idea for code performance. Try to rescue only the attributes needed to run the routine by setting in your clause.
– Rafael Salomão