I have this php code:
if(mysqli_num_rows($query) > 0) {
while($row = mysqli_fetch_array($query)) {
if ($row['status'] == "Opened") {
$test = "1";
} else {
$test = "0";
}
}
}
echo $test;
The problem occurs when there are multiple entries in the database and one of those entries does not have status = "Opened" therefore $test returns "0". I am trying to accomplish that if ANY of the entries have status = "Opened", $test will return "1".