19 lines
383 B
PHP
19 lines
383 B
PHP
|
<?php
|
||
|
|
||
|
require_once("lib/getPDD.php");
|
||
|
|
||
|
$bdd = getPDO();
|
||
|
|
||
|
if ($bdd instanceof PDO) {
|
||
|
try {
|
||
|
$req = $bdd->prepare("SELECT * FROM Photo");
|
||
|
$req->execute();
|
||
|
|
||
|
$photos = $req->fetchAll();
|
||
|
$req->closeCursor();
|
||
|
} catch (Exception $e) {
|
||
|
$alert = choixAlert("query");
|
||
|
}
|
||
|
} elseif ($bdd instanceof Exception)
|
||
|
$alert = choixAlert("query");
|