Copie propre du code final de Folliow (projet d'équipe DWWM)

This commit is contained in:
Yasser Boulayoune 2026-03-06 18:00:00 +01:00
commit eed64cfeb6
67 changed files with 17897 additions and 0 deletions

39
models/ImageModel.php Normal file
View file

@ -0,0 +1,39 @@
<?php
namespace Models;
use \PDO;
/**
* Traitement de la requête pour les images
* @author Laura
*/
class ImageModel extends MotherModel{
/**
* Fonction de récupération des images
* @param int $intLimit
* @return array
*/
public function findAllImage(int $intLimit=0):array{
$strRq = "SELECT image.*
FROM image";
if ($intLimit > 0){
$strRq .= " LIMIT :limit";
}
$rqPrep = $this->_db->prepare($strRq);
if ($intLimit > 0){
$rqPrep->bindValue(":limit", $intLimit, PDO::PARAM_INT);
}
$rqPrep->execute();
return $rqPrep->fetchAll();
}
}