1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
PHP_TP4/models/m_photo.php

19 lines
455 B
PHP
Raw Normal View History

2020-10-27 21:58:56 +01:00
<?php
require_once("lib/getPDD.php");
$bdd = getPDO();
if ($bdd instanceof PDO) {
try {
$req = $bdd->prepare("SELECT * FROM Photo p INNER JOIN Categorie c ON c.catId = p.catId WHERE p.photoId = ?");
$req->execute(array($id));
$photo = $req->fetch();
$req->closeCursor();
} catch (Exception $e) {
$alert = choixAlert("query");
}
} elseif ($bdd instanceof Exception)
$alert = choixAlert("query");