namespace de fait hehe
This commit is contained in:
parent
6c21a5f1cb
commit
0638834933
23 changed files with 131 additions and 81 deletions
32
models/ImageModel.php
Normal file
32
models/ImageModel.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?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 ".$intLimit;
|
||||
}
|
||||
|
||||
return $this->_db->query($strRq)->fetchAll();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue