The question is simple, I have a small database and what I would like to compare is a specific column.
Scenario:
Using PHP to get the result from a querie and getting the value:
$sql = "SELECT verified FROM user WHERE id = ?";
$stmt->bind_param("i", $id);
$stmt->execute();
verified is a tinyint, either 0 or 1.
So how using PHP could make an if statement which compares either the result of $stmt->execute();
is 0 or 1.
<? php if(mysqli_fetch_row($stmt) == 0) {
echo "Not verified"
} else {
echo "Verified"
}
PD: What I would like to know is how to compare and operate on a SQL query.