What return type I should replace in "WHAT?" text. And if the query returns no results?
I'm using PHP 7.1
The method is:
public function retrieveSomething(int $id_user): WHAT? {
try {
$this->sql = 'SELECT * FROM tbl_users WHERE IdUser = :id_user';
$stmt = $this->db->prepare($this->sql);
$stmt->bindValue(':id_user', $id_user, PDO::PARAM_INT);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_OBJ);
$stmt->closeCursor();
return $row;
} catch (PDOException $e) {
throw $e;
} catch (Exception $e) {
throw $e;
}
}