<?php

require_once("lib/getPDD.php");

$bdd = getPDO();

if ($bdd instanceof PDO) {
    $req = $bdd->prepare("SELECT * FROM Sondage");
    $req->execute();
    $polls = $req->fetchAll();
    $req->closeCursor();
} elseif ($bdd instanceof Exception)
    $alert = choixAlert("query");