why always $stmt->num_rows returns 0(zero), Whereas exist 2 records in users table. code:
public function fetch_users()
{
if (!($stmt = $this->mysqli->prepare("SELECT * FROM users"))){
echo "prepare failed: (" . $this->mysql->errno . ") " . $this->mysqli->error;
}
if (!$stmt->execute()) {
echo "Execute failed: (" . $stmt->errno . ") " . $stmt->error;
}
echo $stmt->num_rows;
}