I have a problem and that is that at the moment I do the where with the date I do not know why, even though there is something in the database with the same date to which I do not get anything, so it always enters the if.
The date of the variable that I use to compare the I bring by post from a form with an input type date.
$conexion=mysqli_connect("localhost", "root", "", "basereserva");
$query="SELECT * from mesas where dia=".$fecha;
$resultado=mysqli_query($conexion, $query);
if (mysqli_num_rows($resultado)>0){
print("Exite al menos un registro");
} else {
print("No Existen registros");
}