Bonsoir j'ai un probleme pour afficher mes limites d'affichage de news voici en rapide les 3 lignes :
Et le code complet :Code:
1
2
3 $req = $pdo->prepare("SELECT * FROM news ORDER BY date DESC limit :min,:max"); $req->bindValue(':min', $this->_NewsDebut); $req->bindValue(':max', $this->_NewsFin);
L'erreur est que ca n'affiche rien. Mais pas d'erreur.Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 // Attributs public $_NewsDebut; public $_NewsFin; public function __construct() { $this->_NewsDebut = 0; $this->_NewsFin = 3; } public function recuperer_fullnews(){ $pdo = PDO2::getInstance(); $news = array(); $req = $pdo->prepare("SELECT * FROM news ORDER BY date DESC limit :min,:max"); $req->bindValue(':min', $this->_NewsDebut); $req->bindValue(':max', $this->_NewsFin); $req->execute();
Si vous avez une idée je suis prenneur.