It does not reflect the data when adding a where
in a MySQLi query, if I delete the WHERE
the data is reflected.
<?php
$stmt = $con->prepare("SELECT id_world,hour,date_matches,local,visitor,active FROM world WHERE active=? order by id_world ASC limit 5");
$stmt->bind_param("i",$active);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows>0) {
$stmt->bind_result($id_world, $hour, $date_matches, $local, $visitor, $active);
while ($stmt->fetch()) {
echo '<li><span>'.$hour.' '.$date_matches.'</span> '.$local.' <span class="color">Vs</span> '.$visitor.'</li>';
}
} else {
}
$stmt->close();
?>
You can explain me why this happens, I do not understand, the active column, it is numeric that is to say and it has numerical values in this case it is 1.