prepare("SELECT * FROM Photo"); $req->execute(); $photos = $req->fetchAll(); $req->closeCursor(); } catch (Exception $e) { $alert = choixAlert("query"); } } elseif ($bdd instanceof Exception) $alert = choixAlert("query");