$dbh = new PDO($dsn, $username, $password);
$stmt = $dbh->query($query);
$array = $stmt->fetch();
$stmt->closeCursor();
What would fetch() or fetchAll() method return when no records were found?
- An empty array?
- A non-empty array with field names as the keys and NULLs as the values?
- A NULL value?
- A FALSE value?
- Or just to trigger an error?