Here is a snapshot of my code:
$fetchPictures = $PDO->prepare(\"SELECT * FROM pictures WHERE album = :albumId ORDER BY id ASC LIMIT :s
//BEFORE (Present error) $query = " .... LIMIT :p1, 30;"; ... $stmt->bindParam(':p1', $limiteInferior);
//AFTER (Error corrected) $query = " .... LIMIT :p1, 30;"; ... $limiteInferior = (int)$limiteInferior; $stmt->bindParam(':p1', $limiteInferior, PDO::PARAM_INT);