I don't understand why $amountOfUsers is showing as 0?

This used to work before I moved to the bind\_param function... I was only using query() instad of prepare. But this is a lot safer, I just have trouble understand why this doesn't work, and how to fix it.

```
$stmt = $mysqli->prepare("SELECT id, expire, status, username FROM username WHERE username= ?");
$stmt->bind_param('s', $username);
$stmt->execute();

//Counting results. 0 = Invalid, 1 = Valid
$amountOfUsers = $stmt->num_rows;

```

The error I am getting is: $amountOfUsers isn't counting the number of results properly.