PDO::ERRMODE_EXCEPTION )); } catch (Exception $e) { die("Error : ".$e->getMessage()); } $req = $db->prepare('SELECT * FROM images'); $req->execute(); $result = $req->fetchAll(); ?>