There is a code:
$query = "SELECT * FROM articlePrev WHERE articletype = ? ORDER BY date DESC LIMIT ?,?"; $stmt = $this->pdo->prepare($query); $stmt->execute(array(1,1,5)); return $stmt->fetchAll(PDO::FETCH_ASSOC); Which should return the first five rows from the database, but in the end it returns an empty array. If you substitute the parameters directly, like this:
$query = "SELECT * FROM articlePrev WHERE articletype = 1 ORDER BY date DESC LIMIT 1,5"; That records are displayed. What am I doing wrong?