My code is not working what might be wrong?
In the database the date is with Date / Time as datetime
, follow the code:
<?php
$query = $mysql->query("SELECT * FROM c_clientes WHERE cliente_data_cadastro
BETWEEN '2018-04-07 12:53:14' AND '2018-05-07 12:53:14'");
echo "<center>". mysqli_num_rows($query). " Registros</center>";
while($row = $query->fetch_array())
{
echo $row['cliente_data_cadastro']." - "
.$row['cliente_nome']." "
.$row['cliente_sobrenome']."<br>";
}
?>