See below how to write this block in a way that ensures we will have a successful query. We can't proceed if this query fails.

```
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $interval, $account_id) && $stmt->execute()) {
  $result -> $stmt->get_result();
} else {
  return $this->sqlError();
}
```